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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- Copyright 2015 The Chromium Authors. All rights reserved. 2 <!-- Copyright 2015 The Chromium Authors. All rights reserved.
3 Use of this source code is governed by a BSD-style license that can be 3 Use of this source code is governed by a BSD-style license that can be
4 found in the LICENSE file. --> 4 found in the LICENSE file. -->
5 5
6 <RelativeLayout 6 <RelativeLayout
7 xmlns:android="http://schemas.android.com/apk/res/android" 7 xmlns:android="http://schemas.android.com/apk/res/android"
8 xmlns:chrome="http://schemas.android.com/apk/res-auto" 8 xmlns:chrome="http://schemas.android.com/apk/res-auto"
9 xmlns:tools="http://schemas.android.com/tools" 9 xmlns:tools="http://schemas.android.com/tools"
10 android:id="@+id/snippets_card_view" 10 android:id="@+id/snippets_card_view"
(...skipping 24 matching lines...) Expand all
35 android:layout_marginTop="8dp" 35 android:layout_marginTop="8dp"
36 android:maxLines="2" 36 android:maxLines="2"
37 android:ellipsize="end" 37 android:ellipsize="end"
38 android:textSize="14sp" 38 android:textSize="14sp"
39 android:textColor="@color/snippets_text_color" 39 android:textColor="@color/snippets_text_color"
40 chrome:leading="20dp" /> 40 chrome:leading="20dp" />
41 41
42 <LinearLayout 42 <LinearLayout
43 tools:ignore="UseCompoundDrawables" 43 tools:ignore="UseCompoundDrawables"
44 android:id="@+id/publisher_bar" 44 android:id="@+id/publisher_bar"
45 android:layout_width="match_parent" 45 android:layout_width="wrap_content"
Michael van Ouwerkerk 2017/01/18 19:43:49 I expected this might lead to a width greater than
46 android:layout_height="wrap_content" 46 android:layout_height="wrap_content"
47 android:layout_marginTop="@dimen/snippets_publisher_margin_top_with_arti cle_snippet" 47 android:layout_marginTop="@dimen/snippets_publisher_margin_top_with_arti cle_snippet"
48 android:layout_alignParentStart="true" 48 android:layout_alignParentStart="true"
49 android:layout_below="@+id/article_snippet" 49 android:layout_below="@+id/article_snippet"
50 android:orientation="horizontal"> 50 android:orientation="horizontal">
51 51
52 <!-- The following attributes:
53 - LinearLayout's android:layout_width="wrap_content"
54 - TextView's android:layout_width="0dp"
55 - TextView's android:layout_weight="1"
56 All ensure that when the TextView is long and the ImageView is showing, the TextView starts
57 to ellipsize before pushing the ImageView off the screen. See: https://c rbug.com/678568 -->
52 <TextView 58 <TextView
53 android:id="@+id/article_publisher" 59 android:id="@+id/article_publisher"
54 android:layout_width="wrap_content" 60 android:layout_width="0dp"
61 android:layout_weight="1"
55 android:layout_height="wrap_content" 62 android:layout_height="wrap_content"
56 android:drawablePadding="8dp" 63 android:drawablePadding="8dp"
57 android:paddingStart="4dp" 64 android:paddingStart="4dp"
58 android:maxLines="1" 65 android:maxLines="1"
59 android:ellipsize="end" 66 android:ellipsize="end"
60 android:textSize="12sp" 67 android:textSize="12sp"
61 android:textColor="@color/snippets_publisher_name_color" 68 android:textColor="@color/snippets_publisher_name_color"
62 android:textDirection="locale" /> 69 android:textDirection="locale" />
63 70
64 <!-- We can't add this ImageView as a CompoundDrawable to the TextView b ecause we want to 71 <!-- We can't add this ImageView as a CompoundDrawable to the TextView b ecause we want to
(...skipping 16 matching lines...) Expand all
81 android:id="@+id/article_thumbnail" 88 android:id="@+id/article_thumbnail"
82 android:layout_width="@dimen/snippets_thumbnail_size" 89 android:layout_width="@dimen/snippets_thumbnail_size"
83 android:layout_height="@dimen/snippets_thumbnail_size" 90 android:layout_height="@dimen/snippets_thumbnail_size"
84 android:layout_alignParentTop="true" 91 android:layout_alignParentTop="true"
85 android:layout_alignParentEnd="true" 92 android:layout_alignParentEnd="true"
86 android:layout_marginStart="16dp" 93 android:layout_marginStart="16dp"
87 android:scaleType="centerCrop" 94 android:scaleType="centerCrop"
88 android:contentDescription="@null" 95 android:contentDescription="@null"
89 android:src="@null" /> 96 android:src="@null" />
90 </RelativeLayout> 97 </RelativeLayout>
OLDNEW
« 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