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

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

Issue 1569783005: Notification custom layouts: move settings button to the footer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: chrome/android/java/res/layout/web_notification_big.xml
diff --git a/chrome/android/java/res/layout/web_notification_big.xml b/chrome/android/java/res/layout/web_notification_big.xml
index 69ace433f6fa7212ca923f2d518146627aa18873..851ca13367579e1a33b146c1edb7b9a174be56f1 100644
--- a/chrome/android/java/res/layout/web_notification_big.xml
+++ b/chrome/android/java/res/layout/web_notification_big.xml
@@ -13,10 +13,10 @@
|________| if there is a lot of it. |
| __________________________________________|
| |
- | Button Button Settings |
+ | Button Button |
| __________________________________________|
| |
- | www.example.com |
+ | ⛭ www.example.com |
|_____________________________________________________|
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
@@ -99,26 +99,36 @@
android:id="@+id/footer_divider"
android:layout_width="match_parent"
android:layout_height="1dp"
- android:layout_marginBottom="8dp"
android:contentDescription="@null"
style="@style/WebNotificationDivider"/>
<RelativeLayout
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="10dp">
+ android:layout_height="wrap_content">
- <TextView
+ <ImageView
+ android:id="@+id/origin_settings_icon"
+ android:layout_width="wrap_content"
+ android:layout_height="40dp"
+ android:layout_alignParentStart="true"
+ android:layout_alignParentTop="true"
+ android:contentDescription="@null"
+ android:src="@drawable/settings_cog"
+ android:scaleType="centerInside"/>
+
+ <Button
android:id="@+id/origin"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ 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.
android:layout_marginEnd="8dp"
android:layout_alignParentStart="true"
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
android:layout_toStartOf="@+id/small_icon_footer"
+ android:gravity="start|center_vertical"
+ 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
android:singleLine="true"
android:ellipsize="start"
- style="@style/WebNotificationOrigin"/>
+ style="@style/WebNotificationSettingsButton"/>
<ViewStub
android:id="@id/small_icon_footer"
@@ -128,7 +138,7 @@
android:layout_height="16dp"
android:layout_marginEnd="8dp"
android:layout_alignParentEnd="true"
- android:layout_alignParentTop="true"/>
+ android:layout_centerVertical="true"/>
</RelativeLayout>

Powered by Google App Engine
This is Rietveld 408576698