Home | History | Annotate | Download | only in latin
      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 
     17 package com.android.inputmethod.latin;
     18 
     19 public final class Constants {
     20     public static final class Color {
     21         /**
     22          * The alpha value for fully opaque.
     23          */
     24         public final static int ALPHA_OPAQUE = 255;
     25     }
     26 
     27     public static final class ImeOption {
     28         /**
     29          * The private IME option used to indicate that no microphone should be shown for a given
     30          * text field. For instance, this is specified by the search dialog when the dialog is
     31          * already showing a voice search button.
     32          *
     33          * @deprecated Use {@link ImeOption#NO_MICROPHONE} with package name prefixed.
     34          */
     35         @SuppressWarnings("dep-ann")
     36         public static final String NO_MICROPHONE_COMPAT = "nm";
     37 
     38         /**
     39          * The private IME option used to indicate that no microphone should be shown for a given
     40          * text field. For instance, this is specified by the search dialog when the dialog is
     41          * already showing a voice search button.
     42          */
     43         public static final String NO_MICROPHONE = "noMicrophoneKey";
     44 
     45         /**
     46          * The private IME option used to indicate that no settings key should be shown for a given
     47          * text field.
     48          */
     49         public static final String NO_SETTINGS_KEY = "noSettingsKey";
     50 
     51         /**
     52          * The private IME option used to indicate that the given text field needs ASCII code points
     53          * input.
     54          *
     55          * @deprecated Use EditorInfo#IME_FLAG_FORCE_ASCII.
     56          */
     57         @SuppressWarnings("dep-ann")
     58         public static final String FORCE_ASCII = "forceAscii";
     59 
     60         private ImeOption() {
     61             // This utility class is not publicly instantiable.
     62         }
     63     }
     64 
     65     public static final class Subtype {
     66         /**
     67          * The subtype mode used to indicate that the subtype is a keyboard.
     68          */
     69         public static final String KEYBOARD_MODE = "keyboard";
     70 
     71         public static final class ExtraValue {
     72             /**
     73              * The subtype extra value used to indicate that the subtype keyboard layout is capable
     74              * for typing ASCII characters.
     75              */
     76             public static final String ASCII_CAPABLE = "AsciiCapable";
     77 
     78             /**
     79              * The subtype extra value used to indicate that the subtype require network connection
     80              * to work.
     81              */
     82             public static final String REQ_NETWORK_CONNECTIVITY = "requireNetworkConnectivity";
     83 
     84             /**
     85              * The subtype extra value used to indicate that the subtype display name contains "%s"
     86              * for replacement mark and it should be replaced by this extra value.
     87              * This extra value is supported on JellyBean and later.
     88              */
     89             public static final String UNTRANSLATABLE_STRING_IN_SUBTYPE_NAME =
     90                     "UntranslatableReplacementStringInSubtypeName";
     91 
     92             /**
     93              * The subtype extra value used to indicate that the subtype keyboard layout set name.
     94              * This extra value is private to LatinIME.
     95              */
     96             public static final String KEYBOARD_LAYOUT_SET = "KeyboardLayoutSet";
     97 
     98             /**
     99              * The subtype extra value used to indicate that the subtype is additional subtype
    100              * that the user defined. This extra value is private to LatinIME.
    101              */
    102             public static final String IS_ADDITIONAL_SUBTYPE = "isAdditionalSubtype";
    103 
    104             private ExtraValue() {
    105                 // This utility class is not publicly instantiable.
    106             }
    107         }
    108 
    109         private Subtype() {
    110             // This utility class is not publicly instantiable.
    111         }
    112     }
    113 
    114     public static class TextUtils {
    115         /**
    116          * Capitalization mode for {@link android.text.TextUtils#getCapsMode}: don't capitalize
    117          * characters.  This value may be used with
    118          * {@link android.text.TextUtils#CAP_MODE_CHARACTERS},
    119          * {@link android.text.TextUtils#CAP_MODE_WORDS}, and
    120          * {@link android.text.TextUtils#CAP_MODE_SENTENCES}.
    121          */
    122         public static final int CAP_MODE_OFF = 0;
    123 
    124         private TextUtils() {
    125             // This utility class is not publicly instantiable.
    126         }
    127     }
    128 
    129     public static class Dictionary {
    130         public static final int MAX_WORD_LENGTH = 48;
    131 
    132         private Dictionary() {
    133              // This utility class is no publicly instantiable.
    134         }
    135     }
    136 
    137     public static final int NOT_A_CODE = -1;
    138 
    139     // See {@link KeyboardActionListener.Adapter#isInvalidCoordinate(int)}.
    140     public static final int NOT_A_COORDINATE = -1;
    141     public static final int SUGGESTION_STRIP_COORDINATE = -2;
    142     public static final int SPELL_CHECKER_COORDINATE = -3;
    143 
    144     private Constants() {
    145         // This utility class is not publicly instantiable.
    146     }
    147 }
    148