aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2011-07-28 17:39:43 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-07-28 17:39:43 -0700
commitecf43d4f9ddd164c4dec2c1658b05b10f3514591 (patch)
treea7df2e0da6560ced7aa63301109d305b6b0c3a70 /java/src
parent3782f2bf1ed8988e5abe6d1117f3c0a6fde9abee (diff)
parenta1aab83a24e74cb0fad4b1c1e59b18d23ecbdad3 (diff)
downloadlatinime-ecf43d4f9ddd164c4dec2c1658b05b10f3514591.tar.gz
latinime-ecf43d4f9ddd164c4dec2c1658b05b10f3514591.tar.xz
latinime-ecf43d4f9ddd164c4dec2c1658b05b10f3514591.zip
Merge "Remove dead area around separators in the suggestion strip"
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/CandidateView.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/CandidateView.java b/java/src/com/android/inputmethod/latin/CandidateView.java
index 4baf52e52..713f3abe2 100644
--- a/java/src/com/android/inputmethod/latin/CandidateView.java
+++ b/java/src/com/android/inputmethod/latin/CandidateView.java
@@ -323,8 +323,11 @@ public class CandidateView extends LinearLayout implements OnClickListener {
word.setTag(i);
word.setOnClickListener(this);
mWords.add(word);
+ final View divider = inflater.inflate(R.layout.candidate_divider, null);
+ divider.setTag(i);
+ divider.setOnClickListener(this);
+ mDividers.add(divider);
mInfos.add((TextView)inflater.inflate(R.layout.candidate_info, null));
- mDividers.add(inflater.inflate(R.layout.candidate_divider, null));
}
mTouchToSave = findViewById(R.id.touch_to_save);
@@ -476,6 +479,7 @@ public class CandidateView extends LinearLayout implements OnClickListener {
final TextView word = mWords.get(pos);
final TextPaint paint = word.getPaint();
+ final View divider = mDividers.get(pos);
// TODO: Reorder candidates in strip as appropriate. The center candidate should hold
// the word when space is typed (valid typed word or auto corrected word).
word.setTextColor(getCandidateTextColor(isAutoCorrect,
@@ -505,7 +509,7 @@ public class CandidateView extends LinearLayout implements OnClickListener {
word.setTextScaleX(scaleX);
if (i != 0) {
// Add divider if this isn't the left most suggestion in candidate strip.
- mCandidatesStrip.addView(mDividers.get(i));
+ mCandidatesStrip.addView(divider);
}
mCandidatesStrip.addView(word);
if (params.mCanUseFixedWidthColumns) {
@@ -534,7 +538,6 @@ public class CandidateView extends LinearLayout implements OnClickListener {
}
if (x != 0) {
// Add divider if this isn't the left most suggestion in current row.
- final View divider = mDividers.get(i);
mCandidatesPane.addView(divider);
FrameLayoutCompatUtils.placeViewAt(
divider, x, y + (mCandidateStripHeight - params.mDividerHeight) / 2,