diff options
author | 2010-11-21 16:40:38 -0800 | |
---|---|---|
committer | 2010-11-23 18:07:27 -0800 | |
commit | 59c9930ca98f68aeb6b0b9dc19e29666b8fb152a (patch) | |
tree | 38455864d41d3ecacbb43c4f7681d3f5ef612928 /java/src/com/android/inputmethod/latin/BaseKeyboardView.java | |
parent | a963d0b2e4f1dbe011df383394329d3f95d1d728 (diff) | |
download | latinime-59c9930ca98f68aeb6b0b9dc19e29666b8fb152a.tar.gz latinime-59c9930ca98f68aeb6b0b9dc19e29666b8fb152a.tar.xz latinime-59c9930ca98f68aeb6b0b9dc19e29666b8fb152a.zip |
Support colorScheme <case/> condition in Keyboard XML
Change-Id: Ibbfb99e0e2b15df301f83af6739b7bca01ebf490
Diffstat (limited to 'java/src/com/android/inputmethod/latin/BaseKeyboardView.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/BaseKeyboardView.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/latin/BaseKeyboardView.java b/java/src/com/android/inputmethod/latin/BaseKeyboardView.java index d98cd04b2..129ff81a1 100644 --- a/java/src/com/android/inputmethod/latin/BaseKeyboardView.java +++ b/java/src/com/android/inputmethod/latin/BaseKeyboardView.java @@ -73,6 +73,9 @@ public class BaseKeyboardView extends View implements PointerTracker.UIProxy { private static final boolean DEBUG = false; private static final boolean DEBUG_KEYBOARD_GRID = false; + public static final int COLOR_SCHEME_WHITE = 0; + public static final int COLOR_SCHEME_BLACK = 1; + public static final int NOT_A_TOUCH_COORDINATE = -1; public interface OnKeyboardActionListener { @@ -170,7 +173,7 @@ public class BaseKeyboardView extends View implements PointerTracker.UIProxy { private int mKeyTextColor; private Typeface mKeyTextStyle = Typeface.DEFAULT; private int mLabelTextSize; - private int mSymbolColorScheme = 0; + private int mColorScheme = COLOR_SCHEME_WHITE; private int mShadowColor; private float mShadowRadius; private Drawable mKeyBackground; @@ -490,8 +493,8 @@ public class BaseKeyboardView extends View implements PointerTracker.UIProxy { break; } break; - case R.styleable.BaseKeyboardView_symbolColorScheme: - mSymbolColorScheme = a.getInt(attr, 0); + case R.styleable.BaseKeyboardView_colorScheme: + mColorScheme = a.getInt(attr, COLOR_SCHEME_WHITE); break; } } @@ -659,8 +662,8 @@ public class BaseKeyboardView extends View implements PointerTracker.UIProxy { return mShowPreview; } - public int getSymbolColorScheme() { - return mSymbolColorScheme; + public int getColorScheme() { + return mColorScheme; } public void setPopupParent(View v) { |