diff --git a/java/res/layout/input.xml b/java/res/layout/input_basic.xml similarity index 95% rename from java/res/layout/input.xml rename to java/res/layout/input_basic.xml index 039fdd8df..ffa59543b 100755 --- a/java/res/layout/input.xml +++ b/java/res/layout/input_basic.xml @@ -21,7 +21,7 @@ + + + diff --git a/java/res/layout/input7.xml b/java/res/layout/input_stone_normal.xml similarity index 93% rename from java/res/layout/input7.xml rename to java/res/layout/input_stone_normal.xml index 1290eb8ca..51693502e 100755 --- a/java/res/layout/input7.xml +++ b/java/res/layout/input_stone_normal.xml @@ -31,5 +31,6 @@ latin:keyTextSize="22dip" latin:keyTextColor="@color/latinkeyboard_key_color_black" latin:shadowColor="@color/latinkeyboard_key_color_white" - latin:popupLayout="@layout/input7_popup" + latin:symbolColorScheme="black" + latin:popupLayout="@layout/input_stone_popup" /> diff --git a/java/res/layout/input7_popup.xml b/java/res/layout/input_stone_popup.xml similarity index 86% rename from java/res/layout/input7_popup.xml rename to java/res/layout/input_stone_popup.xml index 2056757fa..e6eae5dad 100755 --- a/java/res/layout/input7_popup.xml +++ b/java/res/layout/input_stone_popup.xml @@ -25,10 +25,9 @@ android:orientation="horizontal" android:background="@drawable/keyboard_popup_panel_background" > - - + + + + + + + + + + + + diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml index 64b8dbe59..f2d823f0b 100644 --- a/java/res/values/strings.xml +++ b/java/res/values/strings.xml @@ -332,18 +332,21 @@ Keyboard Theme Basic Basic (High Contrast) - Default + Default (bold) + Default (normal) @string/layout_basic @string/layout_high_contrast - @string/layout_stone + @string/layout_stone_normal + @string/layout_stone_bold 0 1 2 + 3 Debug (Temporary) diff --git a/java/res/values/styles.xml b/java/res/values/styles.xml index a59a15083..143355033 100644 --- a/java/res/values/styles.xml +++ b/java/res/values/styles.xml @@ -30,5 +30,6 @@ #BB000000 2.75 0.5 + white diff --git a/java/res/xml/prefs.xml b/java/res/xml/prefs.xml index b50588a9e..10e3998f9 100644 --- a/java/res/xml/prefs.xml +++ b/java/res/xml/prefs.xml @@ -60,7 +60,7 @@ android:persistent="true" android:entryValues="@array/keyboard_layout_modes_values" android:entries="@array/keyboard_layout_modes" - android:defaultValue="6" + android:defaultValue="3" /> mMiniKeyboardCache; private int[] mWindowOffset; private Key[] mKeys; + private Typeface mKeyTextStyle = Typeface.DEFAULT; + private int mSymbolColorScheme = 0; /** Listener for {@link OnKeyboardActionListener}. */ private OnKeyboardActionListener mKeyboardActionListener; @@ -334,6 +336,24 @@ public class LatinKeyboardBaseView extends View implements View.OnClickListener case R.styleable.LatinKeyboardBaseView_backgroundDimAmount: mBackgroundDimAmount = a.getFloat(attr, 0.5f); break; + //case android.R.styleable. + case R.styleable.LatinKeyboardBaseView_keyTextStyle: + int textStyle = a.getInt(attr, 0); + switch (textStyle) { + case 0: + mKeyTextStyle = Typeface.DEFAULT; + break; + case 1: + mKeyTextStyle = Typeface.DEFAULT_BOLD; + break; + default: + mKeyTextStyle = Typeface.defaultFromStyle(textStyle); + break; + } + break; + case R.styleable.LatinKeyboardBaseView_symbolColorScheme: + mSymbolColorScheme = a.getInt(attr, 0); + break; } } @@ -526,6 +546,10 @@ public class LatinKeyboardBaseView extends View implements View.OnClickListener return mShowPreview; } + public int getSymbolColorSheme() { + return mSymbolColorScheme; + } + public void setVerticalCorrection(int verticalOffset) { } @@ -693,7 +717,7 @@ public class LatinKeyboardBaseView extends View implements View.OnClickListener paint.setTypeface(Typeface.DEFAULT_BOLD); } else { paint.setTextSize(mKeyTextSize); - paint.setTypeface(Typeface.DEFAULT); + paint.setTypeface(mKeyTextStyle); } // Draw a drop shadow for the text paint.setShadowLayer(mShadowRadius, 0, 0, mShadowColor); @@ -894,7 +918,7 @@ public class LatinKeyboardBaseView extends View implements View.OnClickListener mPreviewText.setTypeface(Typeface.DEFAULT_BOLD); } else { mPreviewText.setTextSize(TypedValue.COMPLEX_UNIT_PX, mPreviewTextSizeLarge); - mPreviewText.setTypeface(Typeface.DEFAULT); + mPreviewText.setTypeface(mKeyTextStyle); } } mPreviewText.measure(MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED),