Index: chrome/android/java/res/layout/web_notification.xml |
diff --git a/chrome/android/java/res/layout/web_notification.xml b/chrome/android/java/res/layout/web_notification.xml |
new file mode 100644 |
index 0000000000000000000000000000000000000000..fbe4e3b774ec5efc07b4aa67e7ee3950a83c32a6 |
--- /dev/null |
+++ b/chrome/android/java/res/layout/web_notification.xml |
@@ -0,0 +1,85 @@ |
+<?xml version="1.0" encoding="utf-8"?> |
+<!-- Copyright 2015 The Chromium Authors. All rights reserved. |
+ Use of this source code is governed by a BSD-style license that can be |
+ found in the LICENSE file. --> |
+ |
+<!-- |
+ Web notification custom layout. |
+ _______________________________________________________ |
+ | | | |
+ | | Title text 1:23 pm | |
+ | Icon | Body text | |
+ | | https://www.example.com/ | |
+ |________|____________________________________________| |
+--> |
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
newt (away)
2015/10/14 05:15:48
It'd be preferable to use a RelativeLayout here an
Michael van Ouwerkerk
2015/10/16 13:51:10
Done.
|
+ android:layout_width="match_parent" |
+ android:layout_height="wrap_content"> |
+ |
+ <FrameLayout |
+ android:layout_width="@android:dimen/notification_large_icon_width" |
+ android:layout_height="@android:dimen/notification_large_icon_height" > |
+ |
+ <ImageView |
+ android:id="@+id/icon" |
+ android:layout_width="match_parent" |
+ android:layout_height="match_parent" |
+ android:scaleType="center" |
newt (away)
2015/10/14 05:15:48
you probably want "centerInside" to ensure that th
Michael van Ouwerkerk
2015/10/16 13:51:10
Done.
|
+ android:contentDescription="@null"/> |
+ |
+ <ImageView |
+ android:layout_width="match_parent" |
newt (away)
2015/10/14 05:15:48
You can put this on the bottom right by making the
Michael van Ouwerkerk
2015/10/16 13:51:10
Done.
|
+ android:layout_height="match_parent" |
+ android:scaleType="center" |
+ android:contentDescription="@null" |
+ android:src="@drawable/ic_chrome"/> |
+ |
+ </FrameLayout> |
+ |
+ <LinearLayout |
+ android:layout_width="match_parent" |
+ android:layout_height="match_parent" |
+ android:orientation="vertical"> |
+ |
+ <LinearLayout |
+ android:layout_width="match_parent" |
+ android:layout_height="wrap_content" |
+ android:orientation="horizontal"> |
+ |
+ <TextView |
+ android:id="@+id/title" |
+ android:layout_width="0dp" |
+ android:layout_height="wrap_content" |
+ android:layout_weight="1" |
+ android:ellipsize="end" |
+ android:singleLine="true" |
+ style="@style/WebNotificationTitle"/> |
+ |
+ <TextView |
+ android:id="@+id/time" |
+ android:layout_width="wrap_content" |
+ android:layout_height="wrap_content" |
+ android:singleLine="true" |
+ style="@style/WebNotificationTime"/> |
+ |
+ </LinearLayout> |
+ |
+ <TextView |
+ android:id="@+id/body" |
+ android:layout_width="match_parent" |
+ android:layout_height="wrap_content" |
+ android:ellipsize="end" |
+ android:singleLine="true" |
+ style="@style/WebNotificationBody"/> |
+ |
+ <TextView |
+ android:id="@+id/origin" |
+ android:layout_width="match_parent" |
+ android:layout_height="wrap_content" |
+ android:ellipsize="end" |
+ android:singleLine="true" |
+ style="@style/WebNotificationOrigin"/> |
+ |
+ </LinearLayout> |
+ |
+</LinearLayout> |