| 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 | | 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 xmlns:tools="http://schemas.android.com/tools" |
| 23 android:layout_width="match_parent" | 24 android:layout_width="match_parent" |
| 24 android:layout_height="wrap_content"> | 25 android:layout_height="wrap_content"> |
| 25 | 26 |
| 26 <include layout="@layout/web_notification_icon_frame" | 27 <include layout="@layout/web_notification_icon_frame" |
| 27 android:id="@+id/icon_frame"/> | 28 android:id="@+id/icon_frame"/> |
| 28 | 29 |
| 29 <!-- | 30 <!-- |
| 30 This LinearLayout handles dynamically changing the visibility of the butto
ns related views. | 31 This LinearLayout handles dynamically changing the visibility of the butto
ns related views. |
| 31 The apparent alternative of setting layout params from Java on a RelativeL
ayout does not work | 32 The apparent alternative of setting layout params from Java on a RelativeL
ayout does not work |
| 32 with RemoteViews. The alternative of using a separate template when there
are buttons was | 33 with RemoteViews. The alternative of using a separate template when there
are buttons was |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 style="@style/WebNotificationButtons"/> | 120 style="@style/WebNotificationButtons"/> |
| 120 | 121 |
| 121 <ImageView | 122 <ImageView |
| 122 android:id="@+id/footer_divider" | 123 android:id="@+id/footer_divider" |
| 123 android:layout_width="match_parent" | 124 android:layout_width="match_parent" |
| 124 android:layout_height="1dp" | 125 android:layout_height="1dp" |
| 125 android:contentDescription="@null" | 126 android:contentDescription="@null" |
| 126 style="@style/WebNotificationDivider"/> | 127 style="@style/WebNotificationDivider"/> |
| 127 | 128 |
| 128 <RelativeLayout | 129 <RelativeLayout |
| 130 tools:ignore="RelativeOverlap" |
| 129 android:layout_width="match_parent" | 131 android:layout_width="match_parent" |
| 130 android:layout_height="wrap_content"> | 132 android:layout_height="wrap_content"> |
| 131 | 133 |
| 132 <ImageView | 134 <ImageView |
| 133 android:id="@+id/origin_settings_icon" | 135 android:id="@+id/origin_settings_icon" |
| 134 android:layout_width="wrap_content" | 136 android:layout_width="wrap_content" |
| 135 android:layout_height="40dp" | 137 android:layout_height="40dp" |
| 136 android:layout_alignParentStart="true" | 138 android:layout_alignParentStart="true" |
| 137 android:layout_alignParentTop="true" | 139 android:layout_alignParentTop="true" |
| 138 android:contentDescription="@null" | 140 android:contentDescription="@null" |
| 139 android:src="@drawable/settings_cog" | 141 android:src="@drawable/settings_cog" |
| 140 android:scaleType="centerInside" | 142 android:scaleType="centerInside" |
| 141 style="@style/WebNotificationSettingsIcon"/> | 143 style="@style/WebNotificationSettingsIcon"/> |
| 142 | 144 |
| 143 <Button | 145 <Button |
| 144 android:id="@+id/origin" | 146 android:id="@+id/origin" |
| 145 android:layout_width="match_parent" | 147 android:layout_width="wrap_content" |
| 146 android:layout_height="wrap_content" | 148 android:layout_height="wrap_content" |
| 147 android:layout_marginEnd="8dp" | |
| 148 android:layout_alignParentStart="true" | 149 android:layout_alignParentStart="true" |
| 149 android:layout_alignParentTop="true" | 150 android:layout_alignParentTop="true" |
| 150 android:layout_toStartOf="@+id/small_icon_footer" | |
| 151 android:minHeight="40dp" | 151 android:minHeight="40dp" |
| 152 android:gravity="start|center_vertical" | 152 android:gravity="start|center_vertical" |
| 153 android:paddingEnd="8dp" |
| 153 android:singleLine="true" | 154 android:singleLine="true" |
| 154 android:ellipsize="start" | 155 android:ellipsize="start" |
| 155 style="@style/WebNotificationSettingsButton"/> | 156 style="@style/WebNotificationSettingsButton"/> |
| 156 | 157 |
| 157 <ViewStub | 158 <ViewStub |
| 158 android:id="@id/small_icon_footer" | 159 android:id="@id/small_icon_footer" |
| 159 android:inflatedId="@id/small_icon_footer" | 160 android:inflatedId="@id/small_icon_footer" |
| 160 android:layout="@layout/web_notification_small_icon" | 161 android:layout="@layout/web_notification_small_icon" |
| 161 android:layout_width="16dp" | 162 android:layout_width="16dp" |
| 162 android:layout_height="16dp" | 163 android:layout_height="16dp" |
| 163 android:layout_marginEnd="8dp" | 164 android:layout_marginEnd="8dp" |
| 164 android:layout_alignParentEnd="true" | 165 android:layout_alignParentEnd="true" |
| 165 android:layout_centerVertical="true"/> | 166 android:layout_centerVertical="true"/> |
| 166 | 167 |
| 167 </RelativeLayout> | 168 </RelativeLayout> |
| 168 | 169 |
| 169 </LinearLayout> | 170 </LinearLayout> |
| 170 | 171 |
| 171 </RelativeLayout> | 172 </RelativeLayout> |
| OLD | NEW |