Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Unified Diff: chrome/android/java/res/layout/new_tab_page_snippets_card.xml

Issue 2646533002: [NTP] Prevent Long Publisher pushing Offline Badge off a card. (Closed)
Patch Set: Added comment. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698