OLD | NEW |
---|---|
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 <!-- | 6 <!-- |
7 Web notification custom layout, big state. | 7 Web notification custom layout, big state. |
8 _______________________________________________________ | 8 _______________________________________________________ |
9 | | | | 9 | | | |
10 | Icon | Title text 1:23 pm | | 10 | Icon | Title text 1:23 pm | |
11 | | | | 11 | | | |
12 | | Body text which may run to multiple lines | | 12 | | Body text which may run to multiple lines | |
13 |________| if there is a lot of it. | | 13 |________| if there is a lot of it. | |
14 | __________________________________________| | 14 | __________________________________________| |
15 | | | 15 | | |
16 | Button Button Settings | | 16 | Button Button | |
17 | __________________________________________| | 17 | __________________________________________| |
18 | | | 18 | | |
19 | www.example.com | | 19 | ⛭ www.example.com | |
20 |_____________________________________________________| | 20 |_____________________________________________________| |
21 --> | 21 --> |
22 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | 22 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
23 android:layout_width="match_parent" | 23 android:layout_width="match_parent" |
24 android:layout_height="wrap_content"> | 24 android:layout_height="wrap_content"> |
25 | 25 |
26 <include layout="@layout/web_notification_icon_frame" | 26 <include layout="@layout/web_notification_icon_frame" |
27 android:id="@+id/icon_frame"/> | 27 android:id="@+id/icon_frame"/> |
28 | 28 |
29 <!-- | 29 <!-- |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
92 android:layout_width="match_parent" | 92 android:layout_width="match_parent" |
93 android:layout_height="wrap_content" | 93 android:layout_height="wrap_content" |
94 android:orientation="horizontal" | 94 android:orientation="horizontal" |
95 android:visibility="gone" | 95 android:visibility="gone" |
96 style="@style/WebNotificationButtons"/> | 96 style="@style/WebNotificationButtons"/> |
97 | 97 |
98 <ImageView | 98 <ImageView |
99 android:id="@+id/footer_divider" | 99 android:id="@+id/footer_divider" |
100 android:layout_width="match_parent" | 100 android:layout_width="match_parent" |
101 android:layout_height="1dp" | 101 android:layout_height="1dp" |
102 android:layout_marginBottom="8dp" | |
103 android:contentDescription="@null" | 102 android:contentDescription="@null" |
104 style="@style/WebNotificationDivider"/> | 103 style="@style/WebNotificationDivider"/> |
105 | 104 |
106 <RelativeLayout | 105 <RelativeLayout |
107 android:layout_width="match_parent" | 106 android:layout_width="match_parent" |
108 android:layout_height="wrap_content" | 107 android:layout_height="wrap_content"> |
109 android:layout_marginBottom="10dp"> | |
110 | 108 |
111 <TextView | 109 <ImageView |
110 android:id="@+id/origin_settings_icon" | |
111 android:layout_width="wrap_content" | |
112 android:layout_height="40dp" | |
113 android:layout_alignParentStart="true" | |
114 android:layout_alignParentTop="true" | |
115 android:contentDescription="@null" | |
116 android:src="@drawable/settings_cog" | |
117 android:scaleType="centerInside"/> | |
118 | |
119 <Button | |
112 android:id="@+id/origin" | 120 android:id="@+id/origin" |
113 android:layout_width="match_parent" | 121 android:layout_width="match_parent" |
114 android:layout_height="wrap_content" | 122 android:layout_height="40dp" |
newt (away)
2016/01/08 23:44:16
it's safer to use minHeight and wrap_content for T
Michael van Ouwerkerk
2016/01/11 16:33:17
Done.
| |
115 android:layout_marginEnd="8dp" | 123 android:layout_marginEnd="8dp" |
116 android:layout_alignParentStart="true" | 124 android:layout_alignParentStart="true" |
117 android:layout_alignParentTop="true" | 125 android:layout_alignParentTop="true" |
newt (away)
2016/01/08 23:44:16
remove alignParentTop since this is centered using
Michael van Ouwerkerk
2016/01/11 16:33:17
I'm not sure I understood this one. This button is
newt (away)
2016/01/11 21:08:28
You're correct. I must have misread the xml when I
| |
118 android:layout_toStartOf="@+id/small_icon_footer" | 126 android:layout_toStartOf="@+id/small_icon_footer" |
127 android:gravity="start|center_vertical" | |
128 android:paddingStart="32dp" | |
newt (away)
2016/01/08 23:44:16
Why paddingStart instead of using layout_toEndOf t
Michael van Ouwerkerk
2016/01/11 16:33:17
This way, the button has some blank space that ove
| |
119 android:singleLine="true" | 129 android:singleLine="true" |
120 android:ellipsize="start" | 130 android:ellipsize="start" |
121 style="@style/WebNotificationOrigin"/> | 131 style="@style/WebNotificationSettingsButton"/> |
122 | 132 |
123 <ViewStub | 133 <ViewStub |
124 android:id="@id/small_icon_footer" | 134 android:id="@id/small_icon_footer" |
125 android:inflatedId="@id/small_icon_footer" | 135 android:inflatedId="@id/small_icon_footer" |
126 android:layout="@layout/web_notification_small_icon" | 136 android:layout="@layout/web_notification_small_icon" |
127 android:layout_width="16dp" | 137 android:layout_width="16dp" |
128 android:layout_height="16dp" | 138 android:layout_height="16dp" |
129 android:layout_marginEnd="8dp" | 139 android:layout_marginEnd="8dp" |
130 android:layout_alignParentEnd="true" | 140 android:layout_alignParentEnd="true" |
131 android:layout_alignParentTop="true"/> | 141 android:layout_centerVertical="true"/> |
132 | 142 |
133 </RelativeLayout> | 143 </RelativeLayout> |
134 | 144 |
135 </LinearLayout> | 145 </LinearLayout> |
136 | 146 |
137 </RelativeLayout> | 147 </RelativeLayout> |
OLD | NEW |