From e49bd1c43acad08f103b38430a8bbcba23f325b3 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Mon, 6 Dec 2010 21:26:38 +0900 Subject: [PATCH] Implement CandidateView using HorizontalScrollView This change re-implements CandidateView using HorizontalScrollView and customized Button, so that the candidate strip can be flingable. This change also introduces the following features. - Highlighting candidate strip and space bar is configurable by @bool/config_candidate_highlight_enabled. - Candidate strip can be centered with left/right padding if @dimen/candidate_strip_padding size is greater than 0. - Candidate text size is configurable by @dimen/candidate_text_size. Bug: 1575885 Bug: 3230726 Change-Id: Iedf78ff31bc9f2f6291a8e8fb7faa0e6b961dd6d --- .../drawable-hdpi/btn_candidate_normal.9.png | Bin 0 -> 215 bytes ...ssed.9.png => btn_candidate_pressed.9.png} | Bin .../drawable-mdpi/btn_candidate_normal.9.png | Bin 0 -> 205 bytes ...ssed.9.png => btn_candidate_pressed.9.png} | Bin java/res/drawable/btn_candidate.xml | 29 + java/res/layout/candidate.xml | 49 ++ java/res/layout/candidates.xml | 51 +- java/res/values-xlarge-land/dimens.xml | 1 + java/res/values-xlarge/bools.xml | 1 + java/res/values-xlarge/dimens.xml | 4 +- java/res/values/bools.xml | 1 + java/res/values/dimens.xml | 2 + .../inputmethod/latin/CandidateView.java | 497 +++++------------- .../android/inputmethod/latin/LatinIME.java | 20 +- 14 files changed, 268 insertions(+), 387 deletions(-) create mode 100644 java/res/drawable-hdpi/btn_candidate_normal.9.png rename java/res/drawable-hdpi/{list_selector_background_pressed.9.png => btn_candidate_pressed.9.png} (100%) create mode 100644 java/res/drawable-mdpi/btn_candidate_normal.9.png rename java/res/drawable-mdpi/{list_selector_background_pressed.9.png => btn_candidate_pressed.9.png} (100%) create mode 100644 java/res/drawable/btn_candidate.xml create mode 100644 java/res/layout/candidate.xml diff --git a/java/res/drawable-hdpi/btn_candidate_normal.9.png b/java/res/drawable-hdpi/btn_candidate_normal.9.png new file mode 100644 index 0000000000000000000000000000000000000000..0ccdb6ab293eaaa169f335a05e1729d964e9aeeb GIT binary patch literal 215 zcmeAS@N?(olHy`uVBq!ia0vp^ia>0~!3HFkrWAoVk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XDm`5sLn>~)xp9&6fB}bVpzh5BhIi_9(l;1tdlvfEFQ4W1+ypv;!PC{xWt~$(6978}NZ$Ye literal 0 HcmV?d00001 diff --git a/java/res/drawable-hdpi/list_selector_background_pressed.9.png b/java/res/drawable-hdpi/btn_candidate_pressed.9.png similarity index 100% rename from java/res/drawable-hdpi/list_selector_background_pressed.9.png rename to java/res/drawable-hdpi/btn_candidate_pressed.9.png diff --git a/java/res/drawable-mdpi/btn_candidate_normal.9.png b/java/res/drawable-mdpi/btn_candidate_normal.9.png new file mode 100644 index 0000000000000000000000000000000000000000..fa6c0fefffbbda6e931438d6387cb1d967d1bf05 GIT binary patch literal 205 zcmeAS@N?(olHy`uVBq!ia0vp^VnD3P!3HD^XWVoKQj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS>Jit;^O978H@y}4@0cR+!I^#Xrl`L}=V#m|^7B?V2_Q@ghG zXT8af77GQz#;F}AH1@nsU1|4lPl%V}ds*wi&>g=k?#y#Gc3xY`owxSv%e3P^EV`T( zeP$RutUt6f?UBdv)z&@p-Demi9%|v-Ke_sgPy)loP0GRVOpeY3TFv0;>gTe~DWM4f Dy~|Ig literal 0 HcmV?d00001 diff --git a/java/res/drawable-mdpi/list_selector_background_pressed.9.png b/java/res/drawable-mdpi/btn_candidate_pressed.9.png similarity index 100% rename from java/res/drawable-mdpi/list_selector_background_pressed.9.png rename to java/res/drawable-mdpi/btn_candidate_pressed.9.png diff --git a/java/res/drawable/btn_candidate.xml b/java/res/drawable/btn_candidate.xml new file mode 100644 index 000000000..b0c1c3038 --- /dev/null +++ b/java/res/drawable/btn_candidate.xml @@ -0,0 +1,29 @@ + + + + + + + diff --git a/java/res/layout/candidate.xml b/java/res/layout/candidate.xml new file mode 100644 index 000000000..37179d2af --- /dev/null +++ b/java/res/layout/candidate.xml @@ -0,0 +1,49 @@ + + + + + +