diff options
author | 2011-08-24 03:35:57 -0700 | |
---|---|---|
committer | 2011-08-24 03:35:57 -0700 | |
commit | 1d59e0dbdf1c15c1e9d01f0ff678c9e421c972bc (patch) | |
tree | 4b0751ab5eb592286f7dec72748d85f43df687c1 /java/src/com/android/inputmethod/latin/CandidateView.java | |
parent | db73604d71b4572ceaf15134b5cbb7c18b20612b (diff) | |
parent | 580e1d7ac0cb90a464a3b3aed88047f85a4ab41f (diff) | |
download | latinime-1d59e0dbdf1c15c1e9d01f0ff678c9e421c972bc.tar.gz latinime-1d59e0dbdf1c15c1e9d01f0ff678c9e421c972bc.tar.xz latinime-1d59e0dbdf1c15c1e9d01f0ff678c9e421c972bc.zip |
Merge "Fix suggestions strip press state to align vertically"
Diffstat (limited to 'java/src/com/android/inputmethod/latin/CandidateView.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/CandidateView.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/CandidateView.java b/java/src/com/android/inputmethod/latin/CandidateView.java index d46b4b5b5..5f20c70b4 100644 --- a/java/src/com/android/inputmethod/latin/CandidateView.java +++ b/java/src/com/android/inputmethod/latin/CandidateView.java @@ -413,8 +413,10 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo // TODO: This "more suggestions hint" should have nicely designed icon. word.setCompoundDrawablesWithIntrinsicBounds( null, null, null, mMoreCandidateHint); + // HACK: To align with other TextView that has no compound drawables. + word.setCompoundDrawablePadding(-mMoreCandidateHint.getIntrinsicHeight()); } else { - word.setCompoundDrawables(null, null, null, null); + word.setCompoundDrawablesWithIntrinsicBounds(null, null, null, null); } // Disable this candidate if the suggestion is null or empty. @@ -426,7 +428,7 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo word.setText(text); // TextView.setText() resets text scale x to 1.0. word.setTextScaleX(scaleX); stripView.addView(word); - setLayoutWeight(word, getCandidateWeight(index), mCandidateStripHeight); + setLayoutWeight(word, getCandidateWeight(index), MATCH_PARENT); if (DBG) { final CharSequence debugInfo = getDebugInfo(suggestions, pos); @@ -526,8 +528,7 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo mPreviewPopup = new PopupWindow(context); mPreviewText = (TextView) inflater.inflate(R.layout.candidate_preview, null); - mPreviewPopup.setWindowLayoutMode(ViewGroup.LayoutParams.WRAP_CONTENT, - ViewGroup.LayoutParams.WRAP_CONTENT); + mPreviewPopup.setWindowLayoutMode(WRAP_CONTENT, WRAP_CONTENT); mPreviewPopup.setContentView(mPreviewText); mPreviewPopup.setBackgroundDrawable(null); |