aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2011-10-18 12:08:49 +0900
committerTadashi G. Takaoka <takaoka@google.com>2011-10-19 16:54:37 +0900
commit2c47080e7b4b9b2a6c2dbf1444e041c1b7943316 (patch)
treee56343f96928fd60bd2eae42ecb9744f45db87c3 /java/src
parent167f76aacbcfbc4963ce1eb8819f1bb2ad786d34 (diff)
downloadlatinime-2c47080e7b4b9b2a6c2dbf1444e041c1b7943316.tar.gz
latinime-2c47080e7b4b9b2a6c2dbf1444e041c1b7943316.tar.xz
latinime-2c47080e7b4b9b2a6c2dbf1444e041c1b7943316.zip
Update suggestions strip divider
Bug: 5142447 Change-Id: I275a304e46456e3b80968fb5de330a3b04bd2035
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/SuggestionsView.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/SuggestionsView.java b/java/src/com/android/inputmethod/latin/SuggestionsView.java
index 937c2c9ff..c25ecb382 100644
--- a/java/src/com/android/inputmethod/latin/SuggestionsView.java
+++ b/java/src/com/android/inputmethod/latin/SuggestionsView.java
@@ -324,6 +324,13 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener,
return Color.argb(newAlpha, Color.red(color), Color.green(color), Color.blue(color));
}
+ private static void addDivider(final ViewGroup stripView, final View divider) {
+ stripView.addView(divider);
+ final LinearLayout.LayoutParams params =
+ (LinearLayout.LayoutParams)divider.getLayoutParams();
+ params.gravity = Gravity.CENTER;
+ }
+
public void layout(SuggestedWords suggestions, ViewGroup stripView, ViewGroup placer,
int stripWidth) {
if (suggestions.isPunctuationSuggestions()) {
@@ -341,7 +348,7 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener,
if (index != 0) {
final View divider = mDividers.get(pos);
// Add divider if this isn't the left most suggestion in suggestions strip.
- stripView.addView(divider);
+ addDivider(stripView, divider);
x += divider.getMeasuredWidth();
}
@@ -421,7 +428,7 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener,
for (int index = 0; index < countInStrip; index++) {
if (index != 0) {
// Add divider if this isn't the left most suggestion in suggestions strip.
- stripView.addView(mDividers.get(index));
+ addDivider(stripView, mDividers.get(index));
}
final TextView word = mWords.get(index);