Chromium Code Reviews| Index: chrome/android/java/res/layout/new_tab_page_snippets_card.xml |
| diff --git a/chrome/android/java/res/layout/new_tab_page_snippets_card.xml b/chrome/android/java/res/layout/new_tab_page_snippets_card.xml |
| index 58eb79b9ed2660647f1ccc5e75be284e1f70a4fb..00d9b7d7907019af10aaec91b92a5a1bfaef7799 100644 |
| --- a/chrome/android/java/res/layout/new_tab_page_snippets_card.xml |
| +++ b/chrome/android/java/res/layout/new_tab_page_snippets_card.xml |
| @@ -42,16 +42,23 @@ |
| <LinearLayout |
| tools:ignore="UseCompoundDrawables" |
| android:id="@+id/publisher_bar" |
| - android:layout_width="match_parent" |
| + android:layout_width="wrap_content" |
|
Michael van Ouwerkerk
2017/01/18 19:43:49
I expected this might lead to a width greater than
|
| android:layout_height="wrap_content" |
| android:layout_marginTop="@dimen/snippets_publisher_margin_top_with_article_snippet" |
| android:layout_alignParentStart="true" |
| android:layout_below="@+id/article_snippet" |
| android:orientation="horizontal"> |
| + <!-- The following attributes: |
| + - LinearLayout's android:layout_width="wrap_content" |
| + - TextView's android:layout_width="0dp" |
| + - TextView's android:layout_weight="1" |
| + All ensure that when the TextView is long and the ImageView is showing, the TextView starts |
| + to ellipsize before pushing the ImageView off the screen. See: https://crbug.com/678568 --> |
| <TextView |
| android:id="@+id/article_publisher" |
| - android:layout_width="wrap_content" |
| + android:layout_width="0dp" |
| + android:layout_weight="1" |
| android:layout_height="wrap_content" |
| android:drawablePadding="8dp" |
| android:paddingStart="4dp" |