Constants.java revision 4daf32b6c0358f0273a99b622a259ecdf6b44fa4
1/* 2 * Copyright (C) 2012 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 * use this file except in compliance with the License. You may obtain a copy of 6 * 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, WITHOUT 12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 * License for the specific language governing permissions and limitations under 14 * the License. 15 */ 16 17package com.android.inputmethod.latin; 18 19import android.view.inputmethod.EditorInfo; 20 21public final class Constants { 22 public static final class Color { 23 /** 24 * The alpha value for fully opaque. 25 */ 26 public final static int ALPHA_OPAQUE = 255; 27 } 28 29 public static final class ImeOption { 30 /** 31 * The private IME option used to indicate that no microphone should be shown for a given 32 * text field. For instance, this is specified by the search dialog when the dialog is 33 * already showing a voice search button. 34 * 35 * @deprecated Use {@link ImeOption#NO_MICROPHONE} with package name prefixed. 36 */ 37 @SuppressWarnings("dep-ann") 38 public static final String NO_MICROPHONE_COMPAT = "nm"; 39 40 /** 41 * The private IME option used to indicate that no microphone should be shown for a given 42 * text field. For instance, this is specified by the search dialog when the dialog is 43 * already showing a voice search button. 44 */ 45 public static final String NO_MICROPHONE = "noMicrophoneKey"; 46 47 /** 48 * The private IME option used to indicate that no settings key should be shown for a given 49 * text field. 50 */ 51 public static final String NO_SETTINGS_KEY = "noSettingsKey"; 52 53 /** 54 * The private IME option used to indicate that the given text field needs ASCII code points 55 * input. 56 * 57 * @deprecated Use {@link EditorInfo#IME_FLAG_FORCE_ASCII}. 58 */ 59 @SuppressWarnings("dep-ann") 60 public static final String FORCE_ASCII = "forceAscii"; 61 62 private ImeOption() { 63 // This utility class is not publicly instantiable. 64 } 65 } 66 67 public static final class Subtype { 68 /** 69 * The subtype mode used to indicate that the subtype is a keyboard. 70 */ 71 public static final String KEYBOARD_MODE = "keyboard"; 72 73 public static final class ExtraValue { 74 /** 75 * The subtype extra value used to indicate that the subtype keyboard layout is capable 76 * for typing ASCII characters. 77 */ 78 public static final String ASCII_CAPABLE = "AsciiCapable"; 79 80 /** 81 * The subtype extra value used to indicate that the subtype require network connection 82 * to work. 83 */ 84 public static final String REQ_NETWORK_CONNECTIVITY = "requireNetworkConnectivity"; 85 86 /** 87 * The subtype extra value used to indicate that the subtype display name contains "%s" 88 * for replacement mark and it should be replaced by this extra value. 89 * This extra value is supported on JellyBean and later. 90 */ 91 public static final String UNTRANSLATABLE_STRING_IN_SUBTYPE_NAME = 92 "UntranslatableReplacementStringInSubtypeName"; 93 94 /** 95 * The subtype extra value used to indicate that the subtype keyboard layout set name. 96 * This extra value is private to LatinIME. 97 */ 98 public static final String KEYBOARD_LAYOUT_SET = "KeyboardLayoutSet"; 99 100 /** 101 * The subtype extra value used to indicate that the subtype is additional subtype 102 * that the user defined. This extra value is private to LatinIME. 103 */ 104 public static final String IS_ADDITIONAL_SUBTYPE = "isAdditionalSubtype"; 105 106 private ExtraValue() { 107 // This utility class is not publicly instantiable. 108 } 109 } 110 111 private Subtype() { 112 // This utility class is not publicly instantiable. 113 } 114 } 115 116 public static class TextUtils { 117 /** 118 * Capitalization mode for {@link android.text.TextUtils#getCapsMode}: don't capitalize 119 * characters. This value may be used with 120 * {@link android.text.TextUtils#CAP_MODE_CHARACTERS}, 121 * {@link android.text.TextUtils#CAP_MODE_WORDS}, and 122 * {@link android.text.TextUtils#CAP_MODE_SENTENCES}. 123 */ 124 public static final int CAP_MODE_OFF = 0; 125 126 private TextUtils() { 127 // This utility class is not publicly instantiable. 128 } 129 } 130 131 private Constants() { 132 // This utility class is not publicly instantiable. 133 } 134} 135