diff --git a/java/res/layout/candidate_word.xml b/java/res/layout/candidate_word.xml index 94ae2b44e..3d2ad06e4 100644 --- a/java/res/layout/candidate_word.xml +++ b/java/res/layout/candidate_word.xml @@ -24,4 +24,5 @@ android:layout_height="wrap_content" android:minWidth="@dimen/candidate_min_width" android:textSize="@dimen/candidate_text_size" + android:padding="0dp" style="?attr/suggestionBackgroundStyle" /> diff --git a/java/res/layout/candidates_strip.xml b/java/res/layout/candidates_strip.xml index c23c29cbe..bb11e057c 100644 --- a/java/res/layout/candidates_strip.xml +++ b/java/res/layout/candidates_strip.xml @@ -56,7 +56,7 @@ android:orientation="horizontal" android:layout_weight="1.0" android:layout_width="0dp" - android:layout_height="wrap_content" + android:layout_height="match_parent" android:gravity="center_vertical" > mWords = new ArrayList(); private final ArrayList mInfos = new ArrayList(); private final ArrayList mDividers = new ArrayList(); - private final int mCandidatePadding; private final int mCandidateStripHeight; private final CharacterStyle mInvertedForegroundColorSpan; private final CharacterStyle mInvertedBackgroundColorSpan; @@ -179,14 +178,13 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo mPreviewPopup.setContentView(mPreviewText); mPreviewPopup.setBackgroundDrawable(null); - mCandidatePadding = res.getDimensionPixelOffset(R.dimen.candidate_padding); mCandidateStripHeight = res.getDimensionPixelOffset(R.dimen.candidate_strip_height); for (int i = 0; i < MAX_SUGGESTIONS; i++) { final TextView word, info; switch (i) { case 0: word = (TextView)findViewById(R.id.word_left); - word.setPadding(mCandidatePadding, 0, 0, 0); + word.setPadding(res.getDimensionPixelOffset(R.dimen.candidate_padding), 0, 0, 0); info = (TextView)findViewById(R.id.info_left); break; case 1: @@ -355,7 +353,7 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo if (info != null) { final int infoWidth = info.getMeasuredWidth(); FrameLayoutCompatUtils.placeViewAt( - info, x + width - infoWidth, y, infoWidth, info.getMeasuredHeight()); + info, width - infoWidth, 0, infoWidth, info.getMeasuredHeight()); } } else { // TODO: Handle overflow case.