From da4bfbbbb3d3aa5dce8f0507d3f3b07ea3e0f26f Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Wed, 6 Apr 2011 13:54:37 +0900 Subject: [PATCH] Fix popup key preview on tablet This change temporally enable popup key preview option on tablet. (config_enable_show_popup_on_keypress_option). Bug: 3286117 Change-Id: Iabbac5a333460e1ed2f8d05ba82f4bae81854b85 --- ...eyboard_key_feedback_background_holo.9.png | Bin 136 -> 4040 bytes ...eyboard_key_feedback_background_holo.9.png | Bin 1004 -> 3804 bytes .../keyboard_key_feedback_honeycomb.xml | 2 +- .../keyboard_popup_honeycomb.xml | 41 ------------------ java/res/layout/input_honeycomb.xml | 2 + java/res/layout/key_preview_honeycomb.xml | 2 +- java/res/layout/keyboard_popup.xml | 9 ++-- java/res/layout/keyboard_popup_honeycomb.xml | 9 ++-- java/res/values-xlarge-land/dimens.xml | 7 +-- java/res/values-xlarge/config.xml | 3 +- java/res/values-xlarge/dimens.xml | 9 ++-- java/res/values/colors.xml | 1 - java/res/values/dimens.xml | 23 +++++----- .../inputmethod/keyboard/KeyboardView.java | 2 +- .../inputmethod/keyboard/LatinKeyboard.java | 2 +- .../keyboard/SlidingLocaleDrawable.java | 2 +- 16 files changed, 39 insertions(+), 75 deletions(-) delete mode 100644 java/res/layout-xlarge/keyboard_popup_honeycomb.xml diff --git a/java/res/drawable-hdpi/keyboard_key_feedback_background_holo.9.png b/java/res/drawable-hdpi/keyboard_key_feedback_background_holo.9.png index 943f9e4bcdab341c94ce1c4cf28e91f7da34c1b7..8d6acacfb49c457061fe5a6a90980d6122ddfa33 100644 GIT binary patch literal 4040 zcmW+(X*iT!7#?F7%QsnOkTql(Yh%mKn22FM+aOCZLbhx}M9Pd(k?pfJVo)KBL4~G5 zW6x4{WfzSiTed{_MnBGbuJ>Hmd7tOp_x;@Gc@u4|%^_SOTmS$7g0?WVXU>_&gM*#< zOkyYrFejF9dvg?^>Z8~q^My0i!X+F4;7&XqEZSW?ROX^ogqd>$H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Db4i zI%-y8uf9^;Hw-aOv$tRdFQJ}u)($nKS{twZ0?J%y6TRyF)6a-&;8y@9Md6w(%MFqG z;l8qQ`E!um?V_KUTm=6W+Z$5AY=Bk2e5qW^G!9!o~j&hICvd delta 121 zcmX>h-@$0u8Q|y6%O%Cdz`(%k>ERLtq**|igAGWo{5Y=;#3^?24B-HR8jh5XiFy+D zTAnVBAsjPHPjBR9P~c%PWcE(^|8f&cm6XeIPd$I36R8TJTNm!W{^g}EyHFSRpUp{f RTY$zec)I$ztaD0e0s!14B5?o! diff --git a/java/res/drawable-mdpi/keyboard_key_feedback_background_holo.9.png b/java/res/drawable-mdpi/keyboard_key_feedback_background_holo.9.png index a7acb4a4dd366d9f47e6e1bd30ab67f189bcdad9..286cf84fc3fe12e63516ae11cf844f1e824b88ec 100644 GIT binary patch delta 3067 zcmZ`*dpOgN_n%#Oo7>p1irQ*4e6dw*(x+@QZ7#Wviti_v`btA9l&{HqX46RHBhl9- z)(2@mNV%nQOMJR1$z5{$h9s;{uHonNJimXxf1GokbDr0Ep7VM==RD8(sxo9~k>qyl zs0MO75(0r}uvzvVTQTr&1C+OXX_2z#R#1xYI7)|o_G;1=+nrcNR zGf8wCCWT3+FenaGCYemJz7Yd8{C^DTe`0E&{x}C4lC?eAnog(g+rp8_R0`RFNp_&q zNEEsabwBflH7pMN&ED&8k{}a)X+xv8e zaI=^*`*^AE``~|UhM)5JQmHhi{uc!(g|}yHL@2LI&ul_YyzNX1mpu4B-%6+-lu13u zTw~fQ1=E=mYsNO-8Bz}i#j9g69=UY<&aT#@32aSwe?>mqKwLnGX950>$InkluA?>f z=+RRqz?t-=GS;XNtxG`K+r!z4DE4b8BN;8!5ort4Ojl&=rRSA0ctW9o$0Qkj%DnIS z+ityNN}|3!M5t-E`nvrE-y8k*1bvCB>iiGX-jv-adb%t6XIMK)=~03GGa|Ib3-Ny9 zvGLPXk(yL3S(V_(sk5uY-I6!`^}5#R@h1>ZU}2uabu<`oZS7`d|Cq(DRxJ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n+Ci z=au3~LK*Ng1`hsrtQ6~E3}pb2f-loVBgGe*Wo(MkC;g^GT)DEjJyabzmJkTtXO!#ogs_6a zf!JoX-Kb~q-DNtO#sp{XyS;2cu%8Zyv=ZS=DB8>~-4gL`H=G8L3ULj@N?zn-wb2oz zK!XO?-u4XfJaK$`{r9VcBS;~ZE*XX0VN{MTCx)2k=YPybs|wK~SfZr_v)4hi5qswl zOFI{T$S$xT(n$ga>kDvzR?0ZwJ^o{D1qY|u)2H=v3-UivRyy&!e{XGbRD5q`#d%1e z0m$opNtOml2OE$K)7ZKnNJ*BsMwA5SrYjo2#j_qlJO1^JF>ZI*ZOVi+2H?EaU0o7*cU7>Bs;7_RIneoCeNL iPLKGz7&;g@3>eOy;IPw+y>tbrj=|H_&t;ucLK6TqCrXF_ diff --git a/java/res/drawable/keyboard_key_feedback_honeycomb.xml b/java/res/drawable/keyboard_key_feedback_honeycomb.xml index dd9b53e46..a3ea140cd 100644 --- a/java/res/drawable/keyboard_key_feedback_honeycomb.xml +++ b/java/res/drawable/keyboard_key_feedback_honeycomb.xml @@ -16,6 +16,6 @@ + android:drawable="@drawable/keyboard_key_feedback_more_background_holo" /> diff --git a/java/res/layout-xlarge/keyboard_popup_honeycomb.xml b/java/res/layout-xlarge/keyboard_popup_honeycomb.xml deleted file mode 100644 index 0b8229ca5..000000000 --- a/java/res/layout-xlarge/keyboard_popup_honeycomb.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - diff --git a/java/res/layout/input_honeycomb.xml b/java/res/layout/input_honeycomb.xml index 6ccc63c2b..96b10b7cc 100644 --- a/java/res/layout/input_honeycomb.xml +++ b/java/res/layout/input_honeycomb.xml @@ -31,6 +31,8 @@ latin:keyBackground="@drawable/btn_keyboard_key_honeycomb" latin:keyPreviewLayout="@layout/key_preview_honeycomb" + latin:keyPreviewHeight="@dimen/key_preview_height_holo" + latin:keyPreviewOffset="@dimen/key_preview_offset_holo" latin:popupLayout="@layout/keyboard_popup_honeycomb" latin:keyTextColorDisabled="#FF63666D" latin:keyLetterStyle="bold" diff --git a/java/res/layout/key_preview_honeycomb.xml b/java/res/layout/key_preview_honeycomb.xml index a90fe5588..2fbfbb517 100644 --- a/java/res/layout/key_preview_honeycomb.xml +++ b/java/res/layout/key_preview_honeycomb.xml @@ -23,7 +23,7 @@ android:layout_height="80sp" android:textSize="40sp" android:textColor="@color/latinkeyboard_key_color_white" - android:minWidth="24dip" + android:minWidth="32dip" android:gravity="center" android:background="@drawable/keyboard_key_feedback_honeycomb" /> diff --git a/java/res/layout/keyboard_popup.xml b/java/res/layout/keyboard_popup.xml index ac8134bfb..013662240 100644 --- a/java/res/layout/keyboard_popup.xml +++ b/java/res/layout/keyboard_popup.xml @@ -19,20 +19,19 @@ --> - + 58.0mm @@ -28,12 +28,13 @@ 13.0mm 1.1mm 0.0mm - - 13.0mm 28dip 20dip 18dip + 26.5mm + 7.5mm + 40.0mm diff --git a/java/res/values-xlarge/config.xml b/java/res/values-xlarge/config.xml index f075b1b50..ed8dc3e52 100644 --- a/java/res/values-xlarge/config.xml +++ b/java/res/values-xlarge/config.xml @@ -22,7 +22,8 @@ false false false - false + + true false false false diff --git a/java/res/values-xlarge/dimens.xml b/java/res/values-xlarge/dimens.xml index 69283202e..cdb6e89a4 100644 --- a/java/res/values-xlarge/dimens.xml +++ b/java/res/values-xlarge/dimens.xml @@ -19,7 +19,7 @@ --> - + 48.0mm @@ -28,8 +28,7 @@ 10.0mm 1.1mm 0.0mm - - 13.0mm + 40dip 12dip @@ -39,9 +38,11 @@ 26dip 16dip - 24dip 6dip + 24dip + 23.0mm + 8.0mm 46dip 15.0mm diff --git a/java/res/values/colors.xml b/java/res/values/colors.xml index 0161589a4..5e9d63203 100644 --- a/java/res/values/colors.xml +++ b/java/res/values/colors.xml @@ -21,7 +21,6 @@ #FFFFFFFF #FFFCAE00 #FFFCAE00 - #00000000 #80000000 #80FFFFFF #FFC0C0C0 diff --git a/java/res/values/dimens.xml b/java/res/values/dimens.xml index 7f00cdba3..2cfc17de9 100644 --- a/java/res/values/dimens.xml +++ b/java/res/values/dimens.xml @@ -19,7 +19,7 @@ --> - + 1.265in @@ -28,25 +28,28 @@ 0.325in 0.00in 0.06in - - 80sp + 16dip + 32dip 8dip 0.390in -0.325in - - 0.13in - 0.083in - 40sp - - 0.13in - 0.000in -0.05in + 0.13in + 0.083in + + 0.13in + 80sp + 0.000in + 36sp + 130sp + 0.193in + 42dip 63dip 0dip diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardView.java b/java/src/com/android/inputmethod/keyboard/KeyboardView.java index 61af15b1d..cc14589f6 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardView.java @@ -37,7 +37,6 @@ import android.graphics.drawable.Drawable; import android.os.Handler; import android.os.Message; import android.os.SystemClock; -import android.provider.Settings; import android.util.AttributeSet; import android.util.Log; import android.util.TypedValue; @@ -378,6 +377,7 @@ public class KeyboardView extends View implements PointerTracker.UIProxy { } mPreviewPopup.setTouchable(false); mPreviewPopup.setAnimationStyle(R.style.KeyPreviewAnimation); + mPreviewPopup.setClippingEnabled(false); mDelayBeforePreview = res.getInteger(R.integer.config_delay_before_preview); mDelayAfterPreview = res.getInteger(R.integer.config_delay_after_preview); mKeyLabelHorizontalPadding = (int)res.getDimension( diff --git a/java/src/com/android/inputmethod/keyboard/LatinKeyboard.java b/java/src/com/android/inputmethod/keyboard/LatinKeyboard.java index 5820049bb..9b87df3fe 100644 --- a/java/src/com/android/inputmethod/keyboard/LatinKeyboard.java +++ b/java/src/com/android/inputmethod/keyboard/LatinKeyboard.java @@ -229,7 +229,7 @@ public class LatinKeyboard extends Keyboard { final Bitmap buffer = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); final Canvas canvas = new Canvas(buffer); final Resources res = mContext.getResources(); - canvas.drawColor(res.getColor(R.color.latinkeyboard_transparent), PorterDuff.Mode.CLEAR); + canvas.drawColor(res.getColor(android.R.color.transparent), PorterDuff.Mode.CLEAR); SubtypeSwitcher subtypeSwitcher = SubtypeSwitcher.getInstance(); // If application locales are explicitly selected. diff --git a/java/src/com/android/inputmethod/keyboard/SlidingLocaleDrawable.java b/java/src/com/android/inputmethod/keyboard/SlidingLocaleDrawable.java index 41f8c2a7c..eee0ac61b 100644 --- a/java/src/com/android/inputmethod/keyboard/SlidingLocaleDrawable.java +++ b/java/src/com/android/inputmethod/keyboard/SlidingLocaleDrawable.java @@ -63,7 +63,7 @@ public class SlidingLocaleDrawable extends Drawable { mHeight = height; final TextPaint textPaint = new TextPaint(); textPaint.setTextSize(getTextSizeFromTheme(android.R.style.TextAppearance_Medium, 18)); - textPaint.setColor(R.color.latinkeyboard_transparent); + textPaint.setColor(android.R.color.transparent); textPaint.setTextAlign(Align.CENTER); textPaint.setAlpha(LatinKeyboard.OPACITY_FULLY_OPAQUE); textPaint.setAntiAlias(true);