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.customizer.LayoutCustomizer; 20 import com.android.inputmethod.keyboard.layout.expected.ExpectedKey; 21 import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder; 22 23 /** 24 * The Uzbek alphabet keyboard. 25 */ 26 public final class Uzbek extends LayoutBase { 27 private static final String LAYOUT_NAME = "uzbek"; 28 Uzbek(final LayoutCustomizer customizer)29 public Uzbek(final LayoutCustomizer customizer) { 30 super(customizer, Symbols.class, SymbolsShifted.class); 31 } 32 33 @Override getName()34 public String getName() { return LAYOUT_NAME; } 35 36 @Override getCommonAlphabetLayout(final boolean isPhone)37 ExpectedKey[][] getCommonAlphabetLayout(final boolean isPhone) { return ALPHABET_COMMON; } 38 39 public static final String ROW1_11 = "ROW1_11"; 40 public static final String ROW2_10 = "ROW2_10"; 41 public static final String ROW2_11 = "ROW2_11"; 42 43 private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder() 44 .setKeysOfRow(1, 45 key("q", additionalMoreKey("1")), 46 key("w", additionalMoreKey("2")), 47 key("e", additionalMoreKey("3")), 48 key("r", additionalMoreKey("4")), 49 key("t", additionalMoreKey("5")), 50 key("y", additionalMoreKey("6")), 51 key("u", additionalMoreKey("7")), 52 key("i", additionalMoreKey("8")), 53 key("o", additionalMoreKey("9")), 54 key("p", additionalMoreKey("0")), 55 ROW1_11) 56 .setKeysOfRow(2, "a", "s", "d", "f", "g", "h", "j", "k", "l", ROW2_10, ROW2_11) 57 .setKeysOfRow(3, "z", "x", "c", "v", "b", "n", "m") 58 .build(); 59 } 60