From 8a296e43c903a3377f28943ba4a59082ae7fe60a Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Tue, 28 Jan 2014 16:19:29 +0900 Subject: [PATCH] Add important notice strip This change is a groundwork to show important notice. Bug: 10587358 Change-Id: I80aa70d30e2a529b37798f0df2183b41df3ac38a --- .../sym_keyboard_info_holo_dark.png | Bin 0 -> 1577 bytes .../sym_keyboard_more_holo_dark.png | Bin 0 -> 1065 bytes .../sym_keyboard_info_holo_dark.png | Bin 0 -> 1054 bytes .../sym_keyboard_more_holo_dark.png | Bin 0 -> 797 bytes .../sym_keyboard_info_holo_dark.png | Bin 0 -> 2270 bytes .../sym_keyboard_more_holo_dark.png | Bin 0 -> 1458 bytes .../sym_keyboard_info_holo_dark.png | Bin 0 -> 2971 bytes .../sym_keyboard_more_holo_dark.png | Bin 0 -> 1935 bytes java/res/layout/suggestions_strip.xml | 13 ++++++++ .../strings-config-important-notice.xml | 5 ++- .../android/inputmethod/latin/LatinIME.java | 7 ++++ .../SuggestionStripLayoutHelper.java | 21 ++++++++++-- .../suggestions/SuggestionStripView.java | 31 ++++++++++++++++-- 13 files changed, 72 insertions(+), 5 deletions(-) create mode 100644 java/res/drawable-hdpi/sym_keyboard_info_holo_dark.png create mode 100644 java/res/drawable-hdpi/sym_keyboard_more_holo_dark.png create mode 100644 java/res/drawable-mdpi/sym_keyboard_info_holo_dark.png create mode 100644 java/res/drawable-mdpi/sym_keyboard_more_holo_dark.png create mode 100644 java/res/drawable-xhdpi/sym_keyboard_info_holo_dark.png create mode 100644 java/res/drawable-xhdpi/sym_keyboard_more_holo_dark.png create mode 100644 java/res/drawable-xxhdpi/sym_keyboard_info_holo_dark.png create mode 100644 java/res/drawable-xxhdpi/sym_keyboard_more_holo_dark.png diff --git a/java/res/drawable-hdpi/sym_keyboard_info_holo_dark.png b/java/res/drawable-hdpi/sym_keyboard_info_holo_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..f52f5af7a848de08de58f900b3eaad808e7b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!U)tQ-AR2p$!hF@23F$0 z_RS#ls`WH)c5C2d;$jm!zJX=*LpJiIazvuu`b%c!w~A2;Vrnghl5NK$a_Zj>nB+n9 zH#OGpl8h{t6`8M;4eQOiHExcKuJ^0s)&A~oZvc%{CsgZL_3Nyb*7^`$BL+lte`CpH z+)hDLW+&ahw4iT7OEA0_`@?S+N8OYQ8`0}N>15|c?g~uVD*#tg^my* zB{+?&_~jYAO_YYxTrDna(^3DOlE>#L#r7)FH|KK5%@4zG=gx>E%+-%=e=t!kdKC5Z9-m)^=UxusXza^j8>-}mCZiwvEr-+>+JcCHo6 za47q%0mFN+D?lIQZG2<9h$nag^9ZMURZ8Fkz+j(Dtf6$`G5ey!wlACuAHd%z^5eN6 zOmP#6F_t}KK_kb#KPzx6&)mVhL`bS#L)E@XWQkIQ8oc8w#W<7OR(^u>i#_A(m=AKo zoKuh~RqSZh%(C6w37$ngMIQ@zm{{*7W5l@p7|33iHuDv4;X#Q+Cb&gEE5E@GYki>IgBpsKi&~Orl W6iQ5t=^_1m*?^0ahhv?6NX9=f?bWIP literal 0 HcmV?d00001 diff --git a/java/res/drawable-hdpi/sym_keyboard_more_holo_dark.png b/java/res/drawable-hdpi/sym_keyboard_more_holo_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..72e2b297d2320c8936442843ad7a38b2ba69052c GIT binary patch literal 1065 zcmeAS@N?(olHy`uVBq!ia0vp^Y9P$P1|(P5zFY^SSkfJR9T^xl_H+M9WCijWi-X*q z7}lMWc?skwBzpw;GB8vDbv3jwF#G}vHN0S8C^cYUc$L7wU^Rn*LA+qju0R{01Y44~ zy9>jA5L~c#`DCC7XMsm#F_88EW4Dvpb_@(mKRsO>Ln02}y|K4HBvj(~$Ma{_NK8_l z;jp}u^T>ruonglsrX71Q%U2_Xxi_Qf4{L@#huSeV$CbxKl~_3ibXK$oaAhkuHcetW z=n|1uu6wR{)AZRh=kC;Z=J7Y0IlcPXy!U@?&;Oh|y{~l9{rBSg%QgzlxBj?~>+|Q& zxBA{yiF3=Qt=L{5d7F8a^%KTr{9>|YOj-7N4{PTfUG`(IG4GDN)@|<-jQ{aIt<#9f zmd(2qa;PyNM_DeJFJ61e7T+D`fF{g+B6YiK^^H!|oCAq9-I6?RHdn5QL_6|-|7iG* z^@@?-gXV@=nXc;!yLbcFi5uj5FD^EF_mQExVD*J%6SIUx>lZdZ4R~5E!?S`h&QX57 z`|M+8L8&3nPH09SnfT+6%cpJorsbq0Z3v2D3p(X@BU|&GbvLY;_`77*wW3S8wBOPi|#w_z3@(4&2(wo{G(CbVF$eY?Uk2)(Xg8u zw3G4q$H=@dF+q_X^QN3?4(iqQT)C&SHRJNZS35$?K5d*7b#wW>!$*JIJ1V=UdpDQ$ z+QP2A6>QN_W%`dpGjDD_dh5;(fqm##4y?YTE34ayQOXr z3h4`;7aJ*a+%vn`QFQAm^Yu(eqt43kml|EM%*?+2LLxC~gJPWN0r4Np7)qU`ruMH{ zdo?T9>(!NrwprXO93Ac+t8plu?clrS#{Z(3vI!w$webEDLGNI=cAW;vX{gD>p=Ch~~6h7XNR)_3*?043(ew%xjPIBhO94@E<6 zeoAIqC2kG7vKA=;HAsSN2+mI{DNig)WpGT%PfAtr%uP&B4N6T+sVqF13d*t!p00i_ I>zopr0DT?6egFUf literal 0 HcmV?d00001 diff --git a/java/res/drawable-mdpi/sym_keyboard_info_holo_dark.png b/java/res/drawable-mdpi/sym_keyboard_info_holo_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..fa4e2390faf64ee9c402b5b01df289184758903b GIT binary patch literal 1054 zcmeAS@N?(olHy`uVBq!ia0vp^k|4~%1|*NXY)uAIEa{HEjtmSN`?>!lvI6;x#X;^) z4C~IxyaaL-l0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#NP=YPV z+ueoXKL{?^yL>WGgtNdSvKUBvfU(=jY&!-9rgxq$jv*e$*Ix7QxEd z=C-cZEdS@|xT1BNr=sH0o}!2AGZk-KQR`C5*6gs}7^=q=WEfP(y0Swf@Pvnp(}iUk zxuLz%zqil&^Lf_yWk=uNnfd$oPd8qx4;Js|-QRh?_}t#_e!pb){V9sH;Jw3}e>ZB-3{ufUFXt$3qvayay`*cwFWUGY+ zea<)JKFJr#OgC&^8qunILv+7!1#7tR9IHt>U0)s+*7Q8xSSY{mtZlaIKaOv0&esEy zw9KdUs2oh2)BkwZkGPoZ!p$~r&h0186|mZM`bHmiFyD7RQEcxf zo$41ytMvAjJJ&~7IagQ|bl=(BT%n+}qvImOt8~FPt5&_5y@PpX^X7&2t>PaQ?oHI> z{UA~HK*X-gpgM24r%l)NP03zYx@(U!r@KGko7BF$S-v2>N?EDS)^?8T7ol_SL{19X zw7xIUwELE+67uPXm>s{J{`oJLoOiUmXD(k8kpAh@4)(&%-k!5I_xjH_nJbmH)R2-8;*4 zd1J&^duh*#%dG1jnCEaM)_c4tU+PnD_Cu{ycX!Z=-v=Yt9A^8v`HfCe#)U_@%yS<| zZ!jxZznt4f=+D{*-KsY;y0>e-t+xIVD8}_5+@kaOho)U7Jy9CEnv(vH%4=>;I{iic zgN_~V9k<3B;ra&~b}j#MsMC+FY>m!oPnpv_B~I(bfA_JRo5wPTE5-fp=JK{bHuL(u zWsVq@7)FI&t$kQ({-pWB>;pR|yye-`x5nX{bAjVs@3bp_ABtSd{x&&!*54FczvF`E zA9zL{p0$64qV5mHJ=qJ7|8LO0vQ+)+kE<0-*-p=S;*PH0*_hbu(v=}~e#LLcSz&R- zzqfo6w>wfTwruJ#fr<8(YddZgU;jI+_&V>OMe}z5liQ}QKkYwLF!M9MTIrxtU=~m< zag8WRNi0dVN-jzTQVd20hQ_*vM!JS(A%3VtQ&&YGO)d;mK4`K4tK9^>bP0l+XkK D(+9`m literal 0 HcmV?d00001 diff --git a/java/res/drawable-mdpi/sym_keyboard_more_holo_dark.png b/java/res/drawable-mdpi/sym_keyboard_more_holo_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..58e27a2df0fd7f9a3297dea951d09b9c52adfe24 GIT binary patch literal 797 zcmeAS@N?(olHy`uVBq!ia0vp^k|4~%1|*NXY)uAIEa{HEjtmSN`?>!lvI6;x#X;^) z4C~IxyaaL-l0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#NP=YPV z+ueoXKL{?^yL>WGgtNdSvKUBvfU(=jY&)RwZ#`WcLp+YJy=L1j;waGm@%}koCALLs z>}*XB8y70Xs4ZGJ{l}&SjmxCwEO-zeaK+)EM*#CdS3`k=K1ZIo9Pv5B*V^6lj_JI^ zx1$SI7v`0frI&AM&9P}O5Z*{|uN%1Ee=w=JUZArt?a7%+h1@>}IadaH zZu+NkH8tSwg@}qW5&P4no?8Eu;vUraW-V_wS@C-D75&evS6@R4?QNRLh^rU;y?)F zK#IZ0z|dIN&`8(NEX2^v%GA=z)KJ&J!pgwlw7Jwg6b-rgDVb@NxHas`TBHQjAPKS| sI6tkVJh3R1!7(L2DOJHUH!(dmC^a#qvhZXoD48;Ny85}Sb4q9e0De9~qW}N^ literal 0 HcmV?d00001 diff --git a/java/res/drawable-xhdpi/sym_keyboard_info_holo_dark.png b/java/res/drawable-xhdpi/sym_keyboard_info_holo_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..513892fb9a9ba2f437af7a5e5956184716258f25 GIT binary patch literal 2270 zcmZ`*dpOe#8~$yx17c`;QP`Z%jb)BGH8wTEoLUaUnA4gv33+Y35;~yhoh%_rCkllM ztF%T@y^)y1a!5#pS4inw-#_19-}PMgb6@xKT=(<*`8;_(-b4jC4LJY+6g)`;KPlsW z0|Ap}`%0{dlw=sLUakOer$GKk1XQX)$$msPpssh@j8vebNPb=bkZu3~oNNI2E-i6B z0ze8D0A^{@5j+6+BZ+_C*HPMlMeZRIfM36(qV4KAX+<`Pv@co8r2oRBE5Qi>;B}q^ zSO3`2o(plO{N0tFWi7>|4u&cQDHR&U`sY?vX}>~VpgE$CC~YpF%g9(;%3$+#OlE^7 z5o)KD^*o~dMX~-rDtInCH1;A4G*C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I$0IV$Riy=Z{ z4;|`LYT;LVmm|y(#t$oOcP`esQv}kF7XqB|mTB;swGavV;)S&WNQ#=UQlDRL%Fgv% zM)hXPLLBe>5!AQSflw$`3N-*!#ZrNx0Qflt0*pL)kpvUm|<(?P*%fNtZ@S$ypLC(N=2}Wcdpb?BUbq8V=NMT^U_A!QeEeCAwsYJ;6GP zeA5BbWasl{IS^X>O^Z&k`h(oJ!cKkN+OsEf7C6I6yy4Ojn8O4v7?u!7xM`QU_Sj)4 ziMMM2jjDaXEX#kAy?!b61jYO5^T;G_G2_zim!CLiRC?6{%Ubh&zyVd(QhU?8*|$Cm zHc_x2NjlA>!GcM~wc%qjiq?TC9M$qwESYKb%KyFe-#=Q_LPvzuq9)toj+u?_MaE`x zYg+c&=qhzZ z6iWsP&VC70asmxSiKmGGuz;H*Ow27z%&kb~Rw$$`3TbWvw?V<-kE}Jz|07_;QX|4n z|G%IovPxeh(AaYz#)c)FBFEDJM`~;+O&7}`(`f`6nR@!<2yHJr0j#s9Q!^%n^$&8w BeEk3b literal 0 HcmV?d00001 diff --git a/java/res/drawable-xxhdpi/sym_keyboard_info_holo_dark.png b/java/res/drawable-xxhdpi/sym_keyboard_info_holo_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..b214d0eca417d628f4e7df9e562c824c49ac6cb7 GIT binary patch literal 2971 zcmbVOdpy&7AK$4Q8_6Z2T$(LZ*p*=iwe7dDYK)wc%4zI}WjEU}sT^8cN+^qo)DF^> zNmEZ(rYF^LsdJu3M6{5j77pot>X}aUJb#?m`Q!P$e!t)M`~Cbr@Av2adi`>lVIdY~ zi_9Pphy^_qh%~NiW*+Fb#&>H;gr{*?D4|A6)(R3N=`0ZlA+ZH9Ci?5 zy)Og95K_P-PUtofxOQ7uRQ$H&_y9IyMKC;2N;DGiKnV*j<#G99qBIEciI-^H&xp|o z_$L)fauDKAr=l55I7J`=;l3!mcRU7*g%b!UtdB2&fc1joFjyQKW4sC8SRbM{M-p8gpEPsm_=CFYAiC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^O_Zmw}nnygoZ}XkGBZBR;b*2G&^k(l{*k5?={O>9Q~P3COJ4|`?Jio8)8@P>}aL+*`4y$fAz z?LKqo2^APow^Nj-2e`OHH(!68*VtHy_6?|u{TZe?~;bg%MVoRj*i?J(O$=HYB+GV{nGvg zclMP_#0Z1!axi>-XH^BG`-Cp@?O<|~`9eU-SX#Hc<0j=qcHCQoqHX@2fJ48Fbr}qy z!||V=fmFeqoagV+Q5*5nCXELb+^Pk7Q}re*%}us<~vx>h}kVFdu5&i?_UV z>w!B6td))JOTdE2$YvxRQ z&PogMHv~nRe1L>r+;hpUvn@hIh`gG8J;E1<4^+A|_58bJS;mEvvHoJT<*UFmhVANdC&xBU6f^(MMi_N3cD6UOBVgKT^ij*x%X*)4&wq2)i8Cwn(aaGi z7OW<7V(M$GYz@T)MIF}z7+X%;Jk^;y7IEr z;?k+*IN$Ugf@6)nPVVVY)hK+(0x-gzsq!L7*I>zlJg(B>GZDv literal 0 HcmV?d00001 diff --git a/java/res/drawable-xxhdpi/sym_keyboard_more_holo_dark.png b/java/res/drawable-xxhdpi/sym_keyboard_more_holo_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..702da27207f45396cc6c2cb9bdc1b0ce0d42df49 GIT binary patch literal 1935 zcmbVNeNYp38jhq!q#{TW1#DfmCsu)EH{^Q^nryNpDG`maq=nin$p#k8ZroiUBH&>o z#Q~>tiXTPgt`zTDbbu;T0WHwh%2WiusI|15X=y1=Kg?NrrKsa=6m0)+`p50;?(bvY z=Xsy^{k`w(u61kE!^7gjcsyRX(V(+%V@B`^6>#sq1M8ExA(qwK*bS76Ex~AL@LAD4pQyG+>oi#Syr176ZKQ%_O7ps=)`m zDsCR!7J>iApL{ ziRHlb1#;eKr%Pqgq0_#&l^V=vS&vF2Dk&)umZSEmC7K8Se(LHq%d1a7W1Z% z%(F8LI-GIPgoh<45(qM4xl|FW205h&ezILR7yYLNRP zbP`ULTmebNTDe|}h+&xmhLuuOkD?lxUZ>RQ^{Ma-$K$YCol>sVK&V8gM_^c=s(}%$ zUJC1_N)$ol`bStJ$*>sdz-RmtoZo4z{!g(ggvK$JqOBCQd8Pu^fLnurr43YNzo%4KGYtHI#(QSoz&N9}`?T+h&4bF5r8*v|Fb`$nC{>K*>! zaHhe!KKk56$yeIYMG2aYW9GWkhGCN~`lt=Eb`XoCv%!p^f7WSrnkf3S#Ky$4=huYh z?yr2p-GtwN8(17#Wslio{%+!@z=gxx$Zxj&nsehfKf*pEuIT>tr&|@wt$t}-_`1%* z8ZGCD_2I-85 zDNVI)?@)Y81I!_|J;0z?4z9eg#vklsc*OBwO{bm&}5|_-Ndi4rq;d?zEEEF*U|K+ zUK*h@j4R1W&|R-Og0?~(TWtIq>FYvq$A1iQygs#`s6FcKA zNx20wQsGAr2x1DK_+ek}8U=7}9sU z(?7?bl9Xo!`84QyTcY2~UK;sha(ttwyZ6YejXn zgUy61u4u@&f9w3w`ng?q1#j#sb%ii58ge9k&I;kp6V~!D%Pq=}hwq;2rQ4JaK zOPd7f#sPdz*(CTa`h6NRQm#7bxI5q3l8=t9^VoI4vf+^5}W^`WKB$wjmgtGAiJ0iOINtN$66JLLn71<&QdFvk}Jn1pTrA>y_9xJGy z41|QN-&6VHtnTL6S9_oN+dixPh#*3>xU54^xnfsuPIG-?+TEev#(!P;1)A(l2@F{6 zZ06KCKe8}nV^rnk>Jr{P*TBW?ydGo1N%_4~v3C`n9?it$oM;0BCdPRR910 literal 0 HcmV?d00001 diff --git a/java/res/layout/suggestions_strip.xml b/java/res/layout/suggestions_strip.xml index 9c83542a6..9ffd231de 100644 --- a/java/res/layout/suggestions_strip.xml +++ b/java/res/layout/suggestions_strip.xml @@ -45,4 +45,17 @@ android:textAlignment="viewStart" style="?attr/suggestionWordStyle" /> + + + diff --git a/java/res/values/strings-config-important-notice.xml b/java/res/values/strings-config-important-notice.xml index 8ee0b99c3..da206a37c 100644 --- a/java/res/values/strings-config-important-notice.xml +++ b/java/res/values/strings-config-important-notice.xml @@ -20,5 +20,8 @@ 0 - + + + + diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 8f4b2d67e..208cf22a6 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1157,6 +1157,13 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen mInputLogic.mSuggest.mDictionaryFacilitator.addWordToUserDictionary(wordToEdit); } + // Callback for the {@link SuggestionStripView}, to call when the important notice strip is + // pressed. + @Override + public void showImportantNoticeContents() { + // TODO: Show dialog to display important notice contents. + } + public void displaySettingsDialog() { if (isShowingOptionDialog()) return; showSubtypeSelectorAndSettings(); diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java index 5ed42ab00..da084e1e9 100644 --- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java +++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java @@ -28,7 +28,6 @@ import android.graphics.Rect; import android.graphics.Typeface; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; -import android.support.v4.view.GravityCompat; import android.support.v4.view.ViewCompat; import android.text.Spannable; import android.text.SpannableString; @@ -45,6 +44,7 @@ import android.view.ViewGroup; import android.widget.LinearLayout; import android.widget.TextView; +import com.android.inputmethod.compat.TextViewCompatUtils; import com.android.inputmethod.latin.LatinImeLogger; import com.android.inputmethod.latin.R; import com.android.inputmethod.latin.SuggestedWords; @@ -492,7 +492,24 @@ final class SuggestionStripLayoutHelper { hintView, 1.0f - mCenterSuggestionWeight, ViewGroup.LayoutParams.MATCH_PARENT); } - private static void setLayoutWeight(final View v, final float weight, final int height) { + public void layoutImportantNotice(final View importantNoticeStrip, final int stripWidth) { + final Resources res = importantNoticeStrip.getResources(); + final Drawable infoIcon = res.getDrawable(R.drawable.sym_keyboard_info_holo_dark); + final Drawable moreIcon = res.getDrawable(R.drawable.sym_keyboard_more_holo_dark); + final int width = stripWidth - infoIcon.getIntrinsicWidth() - moreIcon.getIntrinsicWidth(); + final TextView titleView = (TextView)importantNoticeStrip.findViewById( + R.id.important_notice_title); + titleView.setTextColor(mColorAutoCorrect); + TextViewCompatUtils.setCompoundDrawablesRelativeWithIntrinsicBounds( + titleView, infoIcon, null, moreIcon, null); + final CharSequence importantNoticeTitle = res.getText(R.string.important_notice_title); + titleView.setTextScaleX(1.0f); // Reset textScaleX. + final float titleScaleX = getTextScaleX(importantNoticeTitle, width, titleView.getPaint()); + titleView.setText(importantNoticeTitle); + titleView.setTextScaleX(titleScaleX); + } + + static void setLayoutWeight(final View v, final float weight, final int height) { final ViewGroup.LayoutParams lp = v.getLayoutParams(); if (lp instanceof LinearLayout.LayoutParams) { final LinearLayout.LayoutParams llp = (LinearLayout.LayoutParams)lp; diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java index 22804fce1..fe95d6781 100644 --- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java +++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java @@ -54,6 +54,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick OnLongClickListener { public interface Listener { public void addWordToUserDictionary(String word); + public void showImportantNoticeContents(); public void pickSuggestionManually(int index, SuggestedWordInfo word); } @@ -62,6 +63,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick private final ViewGroup mSuggestionsStrip; private final ViewGroup mAddToDictionaryStrip; + private final View mImportantNoticeStrip; MainKeyboardView mMainKeyboardView; private final View mMoreSuggestionsContainer; @@ -81,10 +83,13 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick private static class StripVisibilityGroup { private final View mSuggestionsStrip; private final View mAddToDictionaryStrip; + private final View mImportantNoticeStrip; - public StripVisibilityGroup(final View suggestionsStrip, final View addToDictionaryStrip) { + public StripVisibilityGroup(final View suggestionsStrip, final View addToDictionaryStrip, + final View importantNoticeStrip) { mSuggestionsStrip = suggestionsStrip; mAddToDictionaryStrip = addToDictionaryStrip; + mImportantNoticeStrip = importantNoticeStrip; showSuggestionsStrip(); } @@ -93,16 +98,25 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick : ViewCompat.LAYOUT_DIRECTION_LTR; ViewCompat.setLayoutDirection(mSuggestionsStrip, layoutDirection); ViewCompat.setLayoutDirection(mAddToDictionaryStrip, layoutDirection); + ViewCompat.setLayoutDirection(mImportantNoticeStrip, layoutDirection); } public void showSuggestionsStrip() { mSuggestionsStrip.setVisibility(VISIBLE); mAddToDictionaryStrip.setVisibility(INVISIBLE); + mImportantNoticeStrip.setVisibility(INVISIBLE); } public void showAddToDictionaryStrip() { mSuggestionsStrip.setVisibility(INVISIBLE); mAddToDictionaryStrip.setVisibility(VISIBLE); + mImportantNoticeStrip.setVisibility(INVISIBLE); + } + + public void showImportantNoticeStrip() { + mSuggestionsStrip.setVisibility(INVISIBLE); + mAddToDictionaryStrip.setVisibility(INVISIBLE); + mImportantNoticeStrip.setVisibility(VISIBLE); } public boolean isShowingAddToDictionaryStrip() { @@ -128,7 +142,9 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick mSuggestionsStrip = (ViewGroup)findViewById(R.id.suggestions_strip); mAddToDictionaryStrip = (ViewGroup)findViewById(R.id.add_to_dictionary_strip); - mStripVisibilityGroup = new StripVisibilityGroup(mSuggestionsStrip, mAddToDictionaryStrip); + mImportantNoticeStrip = findViewById(R.id.important_notice_strip); + mStripVisibilityGroup = new StripVisibilityGroup(mSuggestionsStrip, mAddToDictionaryStrip, + mImportantNoticeStrip); for (int pos = 0; pos < SuggestedWords.MAX_SUGGESTIONS; pos++) { final TextView word = new TextView(context, null, R.attr.suggestionWordStyle); @@ -176,6 +192,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) { ResearchLogger.suggestionStripView_setSuggestions(mSuggestedWords); } + mStripVisibilityGroup.showSuggestionsStrip(); } public int setMoreSuggestionsHeight(final int remainingHeight) { @@ -203,6 +220,12 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick return false; } + public void showImportantNoticeTitle() { + mLayoutHelper.layoutImportantNotice(mImportantNoticeStrip, getWidth()); + mStripVisibilityGroup.showImportantNoticeStrip(); + mImportantNoticeStrip.setOnClickListener(this); + } + public void clear() { mSuggestionsStrip.removeAllViews(); removeAllDebugInfoViews(); @@ -360,6 +383,10 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick @Override public void onClick(final View view) { + if (view == mImportantNoticeStrip) { + mListener.showImportantNoticeContents(); + return; + } final Object tag = view.getTag(); // {@link String} tag is set at {@link #showAddToDictionaryHint(String,CharSequence)}. if (tag instanceof String) {