Skip to content

Commit 83e8ced

Browse files
Luca ZanolinAndroid (Google) Code Review
authored andcommitted
Merge "Change the width of the suggestion item to match the one of the suggestion pop-up"
2 parents 636da63 + 58707d6 commit 83e8ced

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

core/java/android/widget/TextView.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9770,6 +9770,7 @@ protected void measureContent() {
97709770
View view = null;
97719771
for (int i = 0; i < mNumberOfSuggestions; i++) {
97729772
view = mSuggestionsAdapter.getView(i, view, mContentView);
9773+
view.getLayoutParams().width = LayoutParams.WRAP_CONTENT;
97739774
view.measure(horizontalMeasure, verticalMeasure);
97749775
width = Math.max(width, view.getMeasuredWidth());
97759776
}

core/res/res/layout/text_edit_suggestion_item.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
-->
1616

1717
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
18-
android:layout_width="wrap_content"
18+
android:layout_width="match_parent"
1919
android:layout_height="wrap_content"
2020
android:paddingLeft="16dip"
2121
android:paddingRight="16dip"

0 commit comments

Comments
 (0)