Home | History | Annotate | Download | only in layout
      1 /*
      2  * Copyright (C) 2014 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 package com.android.inputmethod.keyboard.layout;
     18 
     19 import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
     20 import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
     21 
     22 public final class Spanish extends LayoutBase {
     23     private static final String LAYOUT_NAME = "spanish";
     24 
     25     public Spanish(final LayoutCustomizer customizer) {
     26         super(customizer, Symbols.class, SymbolsShifted.class);
     27     }
     28 
     29     @Override
     30     public String getName() { return LAYOUT_NAME; }
     31 
     32     @Override
     33     ExpectedKey[][] getCommonAlphabetLayout(final boolean isPhone) { return ALPHABET_COMMON; }
     34 
     35     public static final String ROW2_10 = "ROW2_10";
     36 
     37     private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder()
     38             .setKeysOfRow(1,
     39                     key("q", additionalMoreKey("1")),
     40                     key("w", additionalMoreKey("2")),
     41                     key("e", additionalMoreKey("3")),
     42                     key("r", additionalMoreKey("4")),
     43                     key("t", additionalMoreKey("5")),
     44                     key("y", additionalMoreKey("6")),
     45                     key("u", additionalMoreKey("7")),
     46                     key("i", additionalMoreKey("8")),
     47                     key("o", additionalMoreKey("9")),
     48                     key("p", additionalMoreKey("0")))
     49             .setKeysOfRow(2, "a", "s", "d", "f", "g", "h", "j", "k", "l", ROW2_10)
     50             .setKeysOfRow(3, "z", "x", "c", "v", "b", "n", "m")
     51             .build();
     52 }
     53