diff options
author | 2011-07-28 14:15:24 -0700 | |
---|---|---|
committer | 2011-07-28 14:15:24 -0700 | |
commit | a1aab83a24e74cb0fad4b1c1e59b18d23ecbdad3 (patch) | |
tree | 83070a39d41880eddd2f9980a6143bb51bd183f0 /java/src/com/android/inputmethod/latin | |
parent | 0a5345c7b6e9282ea401a4017c2c2f9835e623b1 (diff) | |
download | latinime-a1aab83a24e74cb0fad4b1c1e59b18d23ecbdad3.tar.gz latinime-a1aab83a24e74cb0fad4b1c1e59b18d23ecbdad3.tar.xz latinime-a1aab83a24e74cb0fad4b1c1e59b18d23ecbdad3.zip |
Remove dead area around separators in the suggestion strip
If user touches the separator, the right hand side suggestion will be
selected.
Bug: 4431485
Change-Id: Ieaa79fe2ac7b15e312829dca847ddb1b25056c09
Diffstat (limited to 'java/src/com/android/inputmethod/latin')
-rw-r--r-- | java/src/com/android/inputmethod/latin/CandidateView.java | 9 |
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, |