From 3118277dd47492089761c0ed1097abaeb376395c Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" <takaoka@google.com> Date: Fri, 1 Jul 2011 14:21:25 +0900 Subject: [PATCH] Tweak ICS theme a bit Change-Id: Ib8f1a712a1fc3fd6f08b336617b4b6a17af11376 --- ...btn_keyboard_key_popup_selected_holo.9.png | Bin 341 -> 384 bytes .../keyboard_suggest_strip_divider.png | Bin 0 -> 1012 bytes .../sym_keyboard_space_led_holo.9.png | Bin 0 -> 322 bytes ...btn_keyboard_key_popup_selected_holo.9.png | Bin 271 -> 257 bytes .../keyboard_suggest_strip_divider.png | Bin 0 -> 2812 bytes .../sym_keyboard_space_led_holo.9.png | Bin 0 -> 201 bytes ...btn_keyboard_key_popup_selected_holo.9.png | Bin 423 -> 366 bytes .../sym_keyboard_space_led_holo.9.png | Bin 0 -> 368 bytes java/res/layout/candidate_divider.xml | 9 +-- java/res/layout/candidate_info.xml | 1 - java/res/layout/candidates_strip.xml | 16 ++-- java/res/values-land/dimens.xml | 2 +- java/res/values-sw600dp/dimens.xml | 2 +- java/res/values-sw768dp/dimens.xml | 2 +- java/res/values/attrs.xml | 1 - java/res/values/dimens.xml | 2 +- java/res/values/keyboard-icons-ics.xml | 2 +- java/res/values/styles.xml | 4 +- .../inputmethod/keyboard/KeyboardView.java | 11 +++ .../inputmethod/latin/CandidateView.java | 70 ++++++++---------- 20 files changed, 58 insertions(+), 64 deletions(-) create mode 100644 java/res/drawable-hdpi/keyboard_suggest_strip_divider.png create mode 100644 java/res/drawable-hdpi/sym_keyboard_space_led_holo.9.png create mode 100644 java/res/drawable-mdpi/keyboard_suggest_strip_divider.png create mode 100644 java/res/drawable-mdpi/sym_keyboard_space_led_holo.9.png create mode 100644 java/res/drawable-xhdpi/sym_keyboard_space_led_holo.9.png diff --git a/java/res/drawable-hdpi/btn_keyboard_key_popup_selected_holo.9.png b/java/res/drawable-hdpi/btn_keyboard_key_popup_selected_holo.9.png index 26a5427733935907097b8523f96f1e1cc989b4de..1ab6160b2dad37bf7b88bc645f5021876f3409df 100644 GIT binary patch delta 371 zcmV-(0gV3D0)PW9iBL{Q4GJ0x0000DNk~Le0000W0000W2nGNE0CReJ^Z)<=0drDE zLIAGL9O;oU7=IyjMObuGZ)S9NVRB^vM{;3sXlY|ZZ*F#Fa&%>KASg+0bY*NQcZd2J z0002^Nkl<Zc${KjARqik!lQtC;Q#;sbisHXaP8SU&B9g3`fR&59x`rSdxjEh)w$tl z-io6WuReXJg~b7wF1hjiy*fw}r52-O%Z?4lu0MaTL4VKz<!euLP}_1C28Aj?2e?n% zx`S2@aO~Z@kDvoUK}9PEfbggTMje370sluGFwhPd@H8;$fKdmGIsgUGqBR7=CavpE z6Lf&rq-|Si<pAftEqe$$pmyWwCR#b5WcBfGf)2R<`jY}RTEplVl(s;vZGsK}N#1$& zQMq)@i99a*o=pcRwHRbZ@#^C}$d(gyz<_p4MkYWDn*X%K=urUx009600{|0^Z*6ut R?t=gT002ovPDHLkV1iobnXCW+ delta 328 zcmV-O0k{5u1JwdCiBL{Q4GJ0x0000DNk~Le0000c0000f2nGNE09k8WdjJ3c1am@3 zR0s$N2z&@+h><QBfA>j5K~z|U?UylX!$1&4pH#$Pf-m7BxJzMjp9CzONrLD^3F+({ z!v<rBnn@88jIegJXoaSj2V3p%_p#02MMM~h+^i%daB}RBsS`!D0d~L^SdKjJ2lxOg z>T(~LldxD(Jpm1{7%9}H1>UI3?>@0y33w&F6u<*ega$ORf9G^AaoL*KDxpYJwk9?k zE*6VvF_VpH`o>I>Go&wP!1Rro#KmH9u~;;*DO(|!t%)5IigY=JHZ`%&gd$zOLYtac z16<O%{L@~udl~Y5TLUHV0z8fsI`j8^d#5fBfjN^e9>;MU$FW2vB4k-_mrq@$cMld3 aegU4(FBiK%4lx4&0000<MNUMnLSTXhb$>qq diff --git a/java/res/drawable-hdpi/keyboard_suggest_strip_divider.png b/java/res/drawable-hdpi/keyboard_suggest_strip_divider.png new file mode 100644 index 0000000000000000000000000000000000000000..7ca3e6131b03adfd1b2d2fa7a29ce314d086a981 GIT binary patch literal 1012 zcmbVL%Wl&^6m^MIRW0qltVV9d0ueu(_@SD}Pa1?vl|~{f#KfL7R%?$LPl?+Vf(=za z0R(@*2f%_gUx36<uwsWO<0LLDN*9b|&)k`N&V8Tl?cQHqzO~G8+-i5n>#_X?`?RG+ z_P@RG#$?+%^#^nxkLUyv#Mv<(BG66Y0qP+bpFI15wmGgbO8Nsj2p^geP6b%$2xXcx zG{<ds${a?Ah=L(HNHUB6{^>IhlGx%Ow?Zk*T{KR1P6^sS-R(!GhmjHUoqJ%rG#NpP zC<JACloe)a@l#%tovUk+2U8V#Xz??r2H_rXF+rduNX<xUOQ0<avbv>d+FhVXvLs51 zC@W1_GgZZuBrsn*vqs{P+4F+AEhbs~n9|%7#mQtMOjH4r15q{%qvBAMCevsZCmDrh zGb=V~1`ibxNphOt3{;G8h>xkoGf!tBq<I)#5@*FcQ7mO*33E{vBr#2^xTe|#?V&$z zT&Z33PjV#oP=Sw0#Og8HsKG3E*Bh!7nK$MmlCYw{BM(Q%DavTqvv~F*#7S(n4PEyY zJ&+tlYwNOX2Z5)nveYsRU-LD$=C}&$1diU)4cB&Lw!Fac72oz%-SZSRaQ&dhcC&)Q zEJC&2gxQ^AoolhCOAw@(^f5lFJ78~&DK5r12kw3ggfL37O0LQ?i`GLVd5+?M;1o>r zYbICOZ@XKz=O}^tuefK}_<wRHGH1l9IsR&v`iga6b-ZkSCR`2=%GksZHX6U)t$bu- zwb}LTe)(<q^Wvh@Sd!M(7GIs8ue|>8{%m16SnuC_@`7t{ciuku>ey*D#$4Cm^*%UH GU;YMn*)?AP literal 0 HcmV?d00001 diff --git a/java/res/drawable-hdpi/sym_keyboard_space_led_holo.9.png b/java/res/drawable-hdpi/sym_keyboard_space_led_holo.9.png new file mode 100644 index 0000000000000000000000000000000000000000..34a1ebde2910f04c9f0f07254a04052bfc10a625 GIT binary patch literal 322 zcmV-I0lof-P)<h;3K|Lk000e1NJLTq001}u001=z1^@s66c{ML0003ANkl<Zc-rmO zze>YU7>4mSG?-Iz30{JOm*7Pd+=`POI@Jp>-=g5+qR>Bs61&yK$<;*!Ib9su?s^sN z@|m7iD2OQ3oEm(7@IWCU@aE9cQpqn}1^@s6000000002FPzC}h?iXAnaH#}e-lJM} zE${o>;yQ0L*OU4<g*97!-d|f-{*_jrw@KmQX(PUUlWIDVs6R=fwoRgo=k>cDB~dzZ zpW~ZxbL-@;>3y6zyRVtc$C>F3)pTvXUA<_yf7I|huw!ecJDlY{ZeBXpuzu`!VBEGl z)sB7jFmRd;oQ4OoTa2Gtd8oJsPv%F72Cl-`lghm9*17q<RyHvEb0AWnfdKxUca|om Uazgl|@Bjb+07*qoM6N<$g1H%yZU6uP literal 0 HcmV?d00001 diff --git a/java/res/drawable-mdpi/btn_keyboard_key_popup_selected_holo.9.png b/java/res/drawable-mdpi/btn_keyboard_key_popup_selected_holo.9.png index a2df532900f27204ab00e022856fb36d16c9b734..7d767439ae199e8c6efecb1f3c7e42507d882fd1 100644 GIT binary patch delta 243 zcmeBYYGl&u4DfU3<&xrJU|`_&^l%9R(h@){#=!<8Z`H<h04c`eAa^H*b?0PWPBfIL zS1fUjC<)F_D=AMbN@Z{_N-W68Om@!CD@!dZNi9;)@XRYo&Cx7x|0N03TIuQH7*a7O zDM3N*Px~W5{!3|H%pXM*>==)vcN|e~tk4qhUNEyw)#GxSpTfa}5}TP4+<buv2Mv>S z6jU<|K5p3Z;Qxf}2``QxT*0amUC_Y9-De||>}bv^=A(3sNs!H>vuX}YvtyRJu|Q}H lKl_LIPCZOOTN(cUXJ%Mf^zymW?}%y;-_zC4Wt~$(69Am!P`m&D delta 257 zcmZo<>Sr?S4DfU3<&xrJU|`_&^l%9R(o#Sy!@&k5>xI`}22w1=PM#qgKv2Vx(lJp_ zqJE>Ni(`mK=i8|VIhhOvT;s27W&IuCsC`Mw<(mq}v<12=Ya^PJKH09B9xHref~mq2 zM?J~3xS|=7Dv1vBlMlW4Aw1`MS?L@GQv-IliCg0iu-+()x^HF3%j7AYkU4>Yr;&BT zS61gmD;+PSrU~{6yWG1oVMY0-u1zJu*W`azzhrk`q$3jeeo?j4*>=|wKY`fV=?h=h zFlf!njB(|fXOf+iUl+A7pyQC|p`GiePT5r&&8qs5ZL*yFB*)DvAn!1Ey85}Sb4q9e E08H~<F#rGn diff --git a/java/res/drawable-mdpi/keyboard_suggest_strip_divider.png b/java/res/drawable-mdpi/keyboard_suggest_strip_divider.png new file mode 100644 index 0000000000000000000000000000000000000000..363936362f40906afd59b09cdbcd70693ab1b004 GIT binary patch literal 2812 zcmV<Y3Ip|tP)<h;3K|Lk000e1NJLTq00031001Qj1^@s6gD8Wk00009a7bBm000XU z000XU0RWnu7ytkYPiaF#P*7-ZbZ>KLZ*U+<Lqi~Na&Km7Y-Iodc-oy)XH-+^7Crag z^g>IBfRsybQWXdwQbLP>6p<z>Aqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uh<iVD~V z<RPMtgQJLw%KPDaqifc@_vX$1wbwr9tn;0-&j-K=43<bUQ8j=JsX`tR;Dg7+#^K~H zK!FM*Z~zbpvt%K2{UZSY_<lS*D<Z%Lz5oGu(+dayz)hRLFdT>f59&ghTmgWD0l;*T zI7<kC6aYYajzXpYKt=(8otP$50H6c_V9R4-;{Z@C0AMG7=F<Rxo%or10RUT+Ar%3j zkpLhQWr#!oXgdI`&sK^>09Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-<?i z0%4j!F2Z@488U%158(66005wo6%pWr^Zj_v4zAA5HjcIqUoGmt2LB>rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_<lS*MWK+n+1cgf z<k(8YLR(?VSAG6x!e78w{cQPuJpA|d;J)G{fihizM+Erb!p!tcr5w+a34~(Y=8s4G zw+sLL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c25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BK<z=<L*0kfKU@CX*zeqbYQT4(^U>T#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot<a{81DF0~rvGr5Xr~8u`lav1h z1DNytV>2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0000dNkl<Zc-mt4|NlP&69WSS(FB8%lF|hx1_lOwlC+UWTx7uIKEMD?3J7)GGlJFt O0000<MNUMnLSTX_t2HhF literal 0 HcmV?d00001 diff --git a/java/res/drawable-mdpi/sym_keyboard_space_led_holo.9.png b/java/res/drawable-mdpi/sym_keyboard_space_led_holo.9.png new file mode 100644 index 0000000000000000000000000000000000000000..abd8b742ef3aacd3b169f3ba2f08ad997d1ba07e GIT binary patch literal 201 zcmeAS@N?(olHy`uVBq!ia0vp^sz9vF!3HFSj~|u;QWHE~978H@B_}M9`@w&7ae_!s zQ=kEt+d&NpRuG5j)a`4F`=nSGGvqhrWF#;p@_hXNUox?%;E#OEf8)L>3mAV*5#hP) zoO{6ZbBUFJdBGW*SbsgXSLc__YPLw9!}oAb<u7r8|I3-|{6*bA`q-~!HhCi`D)VJ> y^0AdJzm{!n`>VrKd)%V%QQLo?#i>_27#Qx)-``!d_Ky?LZ492SelF{r5}E+(woU8+ literal 0 HcmV?d00001 diff --git a/java/res/drawable-xhdpi/btn_keyboard_key_popup_selected_holo.9.png b/java/res/drawable-xhdpi/btn_keyboard_key_popup_selected_holo.9.png index b5e514bb5e5bab9d6aa21ba1b1c488f41b70fa2f..47eee3296c7bf5d71d2d9178e005074f6faa6ffb 100644 GIT binary patch delta 354 zcmV-o0iFJ*1MUJYiBL{Q4GJ0x0000DNk~Le0000i0000g2nGNE0Lb0B8~^|S0drDE zLIAGL9O;oU7k>aDbVXQnQ*UN;cVTj607r6RaA;{`LvL<&WpZ?7av&&4ZggdADR+nZ z82|tP=1D|BRCt{1**gltKoo`HL3BG-qC2q?@r4Vq5|x0Z3sDqe2!anVd(sm_nvjQH zoLnR4z~3fcGtG=K-`gV*$8jHTx~Zcva?l9{mO7&~ntz~1jwt6aN7xqfEJBlo|7ySf zEdckCTOu~@h=vmITmc*BNWgnVuqOfAJY+@PB;bo8I3So{f`15{t|pk^>VVTnFu?>9 zOfbR!4)ztnR|$Bl2zDjl8M-ThmlALn?G&)#Rn<TOuAwG6l#K0|>>JF2r-%sMLknZ~ z5Qg7gp(~NezPWq@%yHFT@}aQoQuhP^0RR630I928S$`QQ4gdfE07*qoM6N<$f?=(V A9RL6T delta 411 zcmaFIw4B+nGr-TCmrII^fq{Y7)59eQNE-pM83!AXY+ZM1Igny0cJd720D>Bhl#Ypd z;`NN4o-U3d8I5me+Iq1#3b@_pk?!2lv^`)7?~%hCNzdXO_cSb0FEH-4?Rv-d?}2Pj zn8^qBQwcphW&2-lOTWEM&L_<HtL-e#RZ_;vjNcx6dMU9V*X;6IXJhf6@%I6?4ZJ$4 zr@pYoFmFG=y7*!HhrUdu-XjbatYJ>V+nz{TupF!JX`5f1wN}i27x$bCb6M{1?Q67M z8X+3V9_B3UdV$?+s#9o+z&ur{mD{x@y*mDH>%CPT`br);LHVI7)iEmOK$K-AQL}5o z3SrHrMJ``vsw8(=O;jqFcn5-hlq<dW3_jy_)8v%WdO^peiB+qW%ysheW@@;uIwAW( zWL~1`49$Y|BCCF{(taRl!F-L$d21?{3}f=r9cQ;X`EEXQkEyKTX+r^*zR7hi{sT)l zbhbMkD?MH)14jSUrp^ouEq=b*m0!=8d6r~+cA8auT+^WjU_di?y85}Sb4q9e0F`*6 AhX4Qo diff --git a/java/res/drawable-xhdpi/sym_keyboard_space_led_holo.9.png b/java/res/drawable-xhdpi/sym_keyboard_space_led_holo.9.png new file mode 100644 index 0000000000000000000000000000000000000000..e192aaf276edf584c605ee4a08b5123f5e3f6894 GIT binary patch literal 368 zcmeAS@N?(olHy`uVBq!ia0vp^UO?=|!3HF=g_uARjKx9jP7LeL$-D$|6iZwqN`mv# zO3D+9QW@Nf5(_dilb!SP%2JC;Qi~KcJo8FYb2Q7_e@Oxr|Mhfn45^s&=JrP3CI^YO zL=~|lnS+8d$643t$TZD95Egk*^^MM+L$Y_AX2<jSn`DTn{!rfM|EX+3v;Gt*mb1!s zHp)sH{eK6}I^BCXK=sGMPe3zKfz^-Pa?3;eSx+TuFgTbd`OHvPtEt@Uq5k^YzNDg; zHE+%DEiSu0y{dS{q1yiJivb_j#XH!Fp1)XgJ?qZl>yaPl#9#1#V{&#!RcEiM*ZFxn zw`{NIS{T<ct!&QJ8_BawmdyR8S1z$?$-zT?F)t6ll{UC=@M?6P`mNn}5;b_!?w*~M zzo_3xC~fOJ`K%qcT;_kVcV=W@NL2?q@&A8jhFg2AAJyI#I}CEMr>mdKI;Vst00|kA A#sB~S literal 0 HcmV?d00001 diff --git a/java/res/layout/candidate_divider.xml b/java/res/layout/candidate_divider.xml index a1059dc2fe..dc5e779663 100644 --- a/java/res/layout/candidate_divider.xml +++ b/java/res/layout/candidate_divider.xml @@ -18,13 +18,10 @@ */ --> -<TextView +<ImageView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="match_parent" - android:text="@string/label_candidate_divider" - android:textSize="@dimen/candidate_text_size" - android:gravity="center" + android:src="@drawable/keyboard_suggest_strip_divider" android:padding="0dp" - android:focusable="false" - android:clickable="false" /> + android:gravity="center" /> diff --git a/java/res/layout/candidate_info.xml b/java/res/layout/candidate_info.xml index f3557289c5..a364d46aae 100644 --- a/java/res/layout/candidate_info.xml +++ b/java/res/layout/candidate_info.xml @@ -24,5 +24,4 @@ android:layout_height="wrap_content" android:textSize="6sp" android:textColor="@android:color/white" - android:visibility="gone" style="?attr/suggestionBackgroundStyle" /> diff --git a/java/res/layout/candidates_strip.xml b/java/res/layout/candidates_strip.xml index 0f542c0a25..2d908863cb 100644 --- a/java/res/layout/candidates_strip.xml +++ b/java/res/layout/candidates_strip.xml @@ -27,9 +27,7 @@ android:orientation="horizontal" android:layout_weight="1.0" android:layout_width="0dp" - android:layout_height="match_parent" - > - </LinearLayout> + android:layout_height="match_parent" /> <LinearLayout android:id="@+id/candidates_pane_control" android:orientation="horizontal" @@ -42,22 +40,22 @@ android:gravity="center" android:layout_width="wrap_content" android:layout_height="match_parent" - android:minWidth="30dp" android:textSize="@dimen/candidate_text_size" - android:padding="0dp" + android:paddingRight="8dp" + android:paddingLeft="8dp" android:visibility="visible" - style="?attr/suggestionBackgroundStyle" /> + android:background="@drawable/btn_keyboard_key_ics" /> <TextView android:id="@+id/close_candidates_pane" android:text="@string/label_close_candidates_pane" android:gravity="center" android:layout_width="wrap_content" android:layout_height="match_parent" - android:minWidth="30dp" android:textSize="@dimen/candidate_text_size" - android:padding="0dp" + android:paddingRight="8dp" + android:paddingLeft="8dp" android:visibility="gone" - style="?attr/suggestionBackgroundStyle" /> + android:background="@drawable/btn_keyboard_key_ics" /> </LinearLayout> <LinearLayout android:id="@+id/touch_to_save" diff --git a/java/res/values-land/dimens.xml b/java/res/values-land/dimens.xml index d5ca250632..4a07156aa4 100644 --- a/java/res/values-land/dimens.xml +++ b/java/res/values-land/dimens.xml @@ -57,7 +57,7 @@ <dimen name="key_preview_offset_ics">0.01in</dimen> - <dimen name="candidate_strip_height">38dip</dimen> + <dimen name="candidate_strip_height">36dip</dimen> <dimen name="candidate_strip_fading_edge_length">63dip</dimen> <!-- Amount of allowance for selecting keys in a mini popup keyboard by sliding finger. --> <!-- popup_key_height x 1.2 --> diff --git a/java/res/values-sw600dp/dimens.xml b/java/res/values-sw600dp/dimens.xml index 1a82b0c6c7..c89a5cdfb3 100644 --- a/java/res/values-sw600dp/dimens.xml +++ b/java/res/values-sw600dp/dimens.xml @@ -68,7 +68,7 @@ <dimen name="key_preview_height_ics">15.0mm</dimen> <dimen name="key_preview_offset_ics">0.05in</dimen> - <dimen name="candidate_strip_height">46dip</dimen> + <dimen name="candidate_strip_height">44dip</dimen> <dimen name="candidate_strip_padding">15.0mm</dimen> <dimen name="candidate_min_width">0.3in</dimen> <dimen name="candidate_padding">12dip</dimen> diff --git a/java/res/values-sw768dp/dimens.xml b/java/res/values-sw768dp/dimens.xml index 81a68e233c..f98cabba4d 100644 --- a/java/res/values-sw768dp/dimens.xml +++ b/java/res/values-sw768dp/dimens.xml @@ -69,7 +69,7 @@ <dimen name="key_preview_height_ics">15.0mm</dimen> <dimen name="key_preview_offset_ics">0.05in</dimen> - <dimen name="candidate_strip_height">46dip</dimen> + <dimen name="candidate_strip_height">44dip</dimen> <!-- candidate_strip_minimum_height = key_preview_height_holo - key_preview_offset_holo + alpha --> <dimen name="candidate_strip_minimum_height">18mm</dimen> diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml index fb99336e87..cf9138ba20 100644 --- a/java/res/values/attrs.xml +++ b/java/res/values/attrs.xml @@ -120,7 +120,6 @@ <attr name="colorTypedWord" format="color" /> <attr name="colorAutoCorrect" format="color" /> <attr name="colorSuggested" format="color" /> - <attr name="colorDivider" format="color" /> <attr name="candidateCountInStrip" format="integer" /> </declare-styleable> diff --git a/java/res/values/dimens.xml b/java/res/values/dimens.xml index 6cf5fe99cb..095ef42271 100644 --- a/java/res/values/dimens.xml +++ b/java/res/values/dimens.xml @@ -73,7 +73,7 @@ <dimen name="key_preview_height_ics">80sp</dimen> <dimen name="key_preview_offset_ics">0.05in</dimen> - <dimen name="candidate_strip_height">42dip</dimen> + <dimen name="candidate_strip_height">40dip</dimen> <!-- candidate_strip_minimum_height = key_preview_height_holo - key_preview_offset_holo + alpha --> <dimen name="candidate_strip_minimum_height">100sp</dimen> diff --git a/java/res/values/keyboard-icons-ics.xml b/java/res/values/keyboard-icons-ics.xml index c813152848..bf2d13d300 100644 --- a/java/res/values/keyboard-icons-ics.xml +++ b/java/res/values/keyboard-icons-ics.xml @@ -50,7 +50,7 @@ <item name="iconPreviewSettingsKey">@drawable/sym_keyboard_settings_holo</item> <item name="iconPreviewShortcutKey">@drawable/sym_keyboard_feedback_mic</item> <!-- LatinKeyboard icons --> - <item name="autoCorrectionSpacebarLedIcon">@drawable/sym_keyboard_space_led</item> + <item name="autoCorrectionSpacebarLedIcon">@drawable/sym_keyboard_space_led_holo</item> <item name="disabledShortcutIcon">@drawable/sym_keyboard_voice_off_holo</item> </style> </resources> diff --git a/java/res/values/styles.xml b/java/res/values/styles.xml index c0cc8fbda5..f731d01338 100644 --- a/java/res/values/styles.xml +++ b/java/res/values/styles.xml @@ -92,7 +92,6 @@ <item name="colorTypedWord">#FFFFFFFF</item> <item name="colorAutoCorrect">#FFFCAE00</item> <item name="colorSuggested">#FFFCAE00</item> - <item name="colorDivider">#20FFFFFF</item> <item name="candidateCountInStrip">@integer/candidate_count_in_strip</item> </style> <!-- Theme "Basic high contrast" --> @@ -191,9 +190,8 @@ <style name="CandidateViewStyle.IceCreamSandwich" parent="SuggestionsStripBackgroundStyle.IceCreamSandwich"> <item name="autoCorrectHighlight">autoCorrectBold|autoCorrectInvert</item> <item name="colorTypedWord">#FFFFFFFF</item> - <item name="colorAutoCorrect">#FFFFFFFF</item> + <item name="colorAutoCorrect">#FF3DC8FF</item> <item name="colorSuggested">#FFFFFFFF</item> - <item name="colorDivider">#20FFFFFF</item> <item name="candidateCountInStrip">@integer/candidate_count_in_strip</item> </style> <style name="PopupMiniKeyboardAnimation"> diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardView.java b/java/src/com/android/inputmethod/keyboard/KeyboardView.java index 203cde915c..752f87d664 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardView.java @@ -394,6 +394,8 @@ public class KeyboardView extends View implements PointerTracker.UIProxy { public int mKeyLetterSize; public final int[] mCoordinates = new int[2]; + private static final int PREVIEW_ALPHA = 240; + public KeyPreviewDrawParams(TypedArray a, KeyDrawParams keyDrawParams) { mPreviewBackground = a.getDrawable(R.styleable.KeyboardView_keyPreviewBackground); mPreviewLeftBackground = a.getDrawable( @@ -402,6 +404,9 @@ public class KeyboardView extends View implements PointerTracker.UIProxy { R.styleable.KeyboardView_keyPreviewRightBackground); mPreviewSpacebarBackground = a.getDrawable( R.styleable.KeyboardView_keyPreviewSpacebarBackground); + setAlpha(mPreviewBackground, PREVIEW_ALPHA); + setAlpha(mPreviewLeftBackground, PREVIEW_ALPHA); + setAlpha(mPreviewRightBackground, PREVIEW_ALPHA); mPreviewOffset = a.getDimensionPixelOffset( R.styleable.KeyboardView_keyPreviewOffset, 0); mPreviewHeight = a.getDimensionPixelSize( @@ -417,6 +422,12 @@ public class KeyboardView extends View implements PointerTracker.UIProxy { mPreviewTextSize = (int)(keyHeight * mPreviewTextRatio); mKeyLetterSize = (int)(keyHeight * mKeyLetterRatio); } + + private static void setAlpha(Drawable drawable, int alpha) { + if (drawable == null) + return; + drawable.setAlpha(alpha); + } } public KeyboardView(Context context, AttributeSet attrs) { diff --git a/java/src/com/android/inputmethod/latin/CandidateView.java b/java/src/com/android/inputmethod/latin/CandidateView.java index ecabe6792b..01b1dd6e3e 100644 --- a/java/src/com/android/inputmethod/latin/CandidateView.java +++ b/java/src/com/android/inputmethod/latin/CandidateView.java @@ -61,8 +61,8 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo private static final CharacterStyle UNDERLINE_SPAN = new UnderlineSpan(); // The maximum number of suggestions available. See {@link Suggest#mPrefMaxSuggestions}. private static final int MAX_SUGGESTIONS = 18; - private static final int MATCH_PARENT = ViewGroup.LayoutParams.MATCH_PARENT; private static final int WRAP_CONTENT = ViewGroup.LayoutParams.WRAP_CONTENT; + private static final int MATCH_PARENT = ViewGroup.LayoutParams.MATCH_PARENT; private static final boolean DBG = LatinImeLogger.sDBG; @@ -90,7 +90,6 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo private final int mColorTypedWord; private final int mColorAutoCorrect; private final int mColorSuggestedCandidate; - private final int mColorDivider; private final PopupWindow mPreviewPopup; private final TextView mPreviewText; @@ -184,6 +183,7 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo final float textSize = res.getDimension(R.dimen.candidate_text_size); mPaint.setTextSize(textSize); mPadding = res.getDimensionPixelSize(R.dimen.candidate_padding); + divider.measure(WRAP_CONTENT, MATCH_PARENT); mDividerWidth = divider.getMeasuredWidth(); mDividerHeight = divider.getMeasuredHeight(); mControlWidth = control.getMeasuredWidth(); @@ -295,7 +295,6 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo mColorTypedWord = a.getColor(R.styleable.CandidateView_colorTypedWord, 0); mColorAutoCorrect = a.getColor(R.styleable.CandidateView_colorAutoCorrect, 0); mColorSuggestedCandidate = a.getColor(R.styleable.CandidateView_colorSuggested, 0); - mColorDivider = a.getColor(R.styleable.CandidateView_colorDivider, 0); mCandidateCountInStrip = a.getInt( R.styleable.CandidateView_candidateCountInStrip, DEFAULT_CANDIDATE_COUNT_IN_STRIP); a.recycle(); @@ -321,7 +320,7 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo word.setOnLongClickListener(this); mWords.add(word); mInfos.add((TextView)inflater.inflate(R.layout.candidate_info, null)); - mDividers.add(getDivider(inflater)); + mDividers.add(inflater.inflate(R.layout.candidate_divider, null)); } mTouchToSave = findViewById(R.id.touch_to_save); @@ -333,6 +332,7 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo mCandidatesPaneControl = (ViewGroup)findViewById(R.id.candidates_pane_control); mExpandCandidatesPane = (TextView)findViewById(R.id.expand_candidates_pane); + mExpandCandidatesPane.getBackground().setAlpha(180); mExpandCandidatesPane.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { @@ -340,6 +340,7 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo } }); mCloseCandidatesPane = (TextView)findViewById(R.id.close_candidates_pane); + mCloseCandidatesPane.getBackground().setAlpha(180); mCloseCandidatesPane.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { @@ -348,15 +349,8 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo }); mCandidatesPaneControl.measure(WRAP_CONTENT, WRAP_CONTENT); - mParams = new CandidateViewLayoutParams(res, mDividers.get(0), mCandidatesPaneControl, - mAutoCorrectHighlight); - } - - private View getDivider(LayoutInflater inflater) { - final TextView divider = (TextView)inflater.inflate(R.layout.candidate_divider, null); - divider.setTextColor(mColorDivider); - divider.measure(WRAP_CONTENT, WRAP_CONTENT); - return divider; + mParams = new CandidateViewLayoutParams( + res, mDividers.get(0), mCandidatesPaneControl, mAutoCorrectHighlight); } /** @@ -429,7 +423,7 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo ? PUNCTUATIONS_IN_STRIP : mCandidateCountInStrip); final int count = Math.min(mWords.size(), suggestions.size()); - if (count <= params.mCountInStrip) { + if (count <= params.mCountInStrip && !DBG) { mCandidatesPaneControl.setVisibility(GONE); } else { mCandidatesPaneControl.setVisibility(VISIBLE); @@ -437,8 +431,8 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo } final int countInStrip = params.mCountInStrip; - int fromIndex = countInStrip; - int x = 0, y = 0; + View centeringFrom = null, lastView = null; + int x = 0, y = 0, infoX = 0; for (int i = 0; i < count; i++) { final int pos; if (i <= 1) { @@ -497,18 +491,18 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo } mCandidatesStrip.addView(word); if (params.mCanUseFixedWidthColumns) { - setLayoutWeight(word, 1.0f); + setLayoutWeight(word, 1.0f, mCandidateStripHeight); } else { final int width = getTextWidth(text, paint) + params.mPadding * 2; - setLayoutWeight(word, width); + setLayoutWeight(word, width, mCandidateStripHeight); } if (info != null) { - word.measure(WRAP_CONTENT, MATCH_PARENT); - final int width = word.getMeasuredWidth(); + mCandidatesPane.addView(info); info.measure(WRAP_CONTENT, WRAP_CONTENT); - final int infoWidth = info.getMeasuredWidth(); - FrameLayoutCompatUtils.placeViewAt( - info, width - infoWidth, 0, infoWidth, info.getMeasuredHeight()); + final int width = info.getMeasuredWidth(); + y = info.getMeasuredHeight(); + FrameLayoutCompatUtils.placeViewAt(info, infoX, 0, width, y); + infoX += width * 2; } } else { paint.setTextScaleX(1.0f); @@ -516,10 +510,9 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo int available = paneWidth - x - params.mPadding * 2; if (textWidth >= available) { // Needs new row, centering previous row. - centeringCandidates(fromIndex, i - 1, x, paneWidth); + centeringCandidates(centeringFrom, lastView, x, paneWidth); x = 0; y += mCandidateStripHeight; - fromIndex = i; } if (x != 0) { // Add divider if this isn't the left most suggestion in current row. @@ -536,46 +529,45 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo word.setText(text); word.setTextScaleX(scaleX); mCandidatesPane.addView(word); - word.measure(WRAP_CONTENT, WRAP_CONTENT); + lastView = word; + if (x == 0) centeringFrom = word; + word.measure(WRAP_CONTENT, + MeasureSpec.makeMeasureSpec(mCandidateStripHeight, MeasureSpec.EXACTLY)); final int width = word.getMeasuredWidth(); final int height = word.getMeasuredHeight(); FrameLayoutCompatUtils.placeViewAt( word, x, y + (mCandidateStripHeight - height) / 2, width, height); + x += width; if (info != null) { mCandidatesPane.addView(info); + lastView = info; info.measure(WRAP_CONTENT, WRAP_CONTENT); final int infoWidth = info.getMeasuredWidth(); FrameLayoutCompatUtils.placeViewAt( - info, x + width - infoWidth, y, infoWidth, info.getMeasuredHeight()); + info, x - infoWidth, y, infoWidth, info.getMeasuredHeight()); } - x += width; } } if (x != 0) { // Centering last candidates row. - centeringCandidates(fromIndex, count - 1, x, paneWidth); + centeringCandidates(centeringFrom, lastView, x, paneWidth); } } - private static void setLayoutWeight(View v, float weight) { + private static void setLayoutWeight(View v, float weight, int height) { final ViewGroup.LayoutParams lp = v.getLayoutParams(); if (lp instanceof LinearLayout.LayoutParams) { final LinearLayout.LayoutParams llp = (LinearLayout.LayoutParams)lp; llp.weight = weight; llp.width = 0; - llp.height = MATCH_PARENT; + llp.height = height; } } - private void centeringCandidates(int from, int to, int width, int paneWidth) { + private void centeringCandidates(View from, View to, int width, int paneWidth) { final ViewGroup pane = mCandidatesPane; - final int fromIndex = pane.indexOfChild(mWords.get(from)); - final int toIndex; - if (mInfos.get(to).getParent() != null) { - toIndex = pane.indexOfChild(mInfos.get(to)); - } else { - toIndex = pane.indexOfChild(mWords.get(to)); - } + final int fromIndex = pane.indexOfChild(from); + final int toIndex = pane.indexOfChild(to); final int offset = (paneWidth - width) / 2; for (int index = fromIndex; index <= toIndex; index++) { offsetMargin(pane.getChildAt(index), offset, 0); -- GitLab