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..728743ca633d60b12e5f0038cfdf183f5b0340d1 |
--- /dev/null |
+++ b/chrome/android/java/res/layout/web_notification.xml |
@@ -0,0 +1,83 @@ |
+<?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/ | |
+ |________|____________________________________________| |
+--> |
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
+ android:layout_width="match_parent" |
+ android:layout_height="wrap_content"> |
+ |
+ <FrameLayout |
+ android:id="@+id/icon_frame" |
+ android:layout_width="@android:dimen/notification_large_icon_width" |
+ android:layout_height="@android:dimen/notification_large_icon_height" |
+ android:layout_alignParentStart="true"> |
+ |
+ <ImageView |
+ android:id="@+id/icon" |
+ android:layout_width="match_parent" |
+ android:layout_height="match_parent" |
+ android:scaleType="centerInside" |
+ android:contentDescription="@null"/> |
+ |
+ <ImageView |
+ android:layout_width="wrap_content" |
+ android:layout_height="wrap_content" |
+ android:layout_gravity="bottom|end" |
+ android:contentDescription="@null" |
+ android:src="@drawable/ic_chrome"/> |
+ |
+ </FrameLayout> |
+ |
+ <TextView |
+ android:id="@+id/title" |
+ android:layout_width="wrap_content" |
+ android:layout_height="wrap_content" |
+ android:layout_toEndOf="@id/icon_frame" |
+ android:layout_toStartOf="@id/time" |
+ android:layout_alignParentTop="true" |
+ android:singleLine="true" |
+ android:ellipsize="end" |
+ style="@style/WebNotificationTitle"/> |
+ |
+ <TextView |
+ android:id="@+id/time" |
+ android:layout_width="wrap_content" |
+ android:layout_height="wrap_content" |
+ android:layout_alignParentEnd="true" |
+ android:layout_alignParentTop="true" |
+ android:singleLine="true" |
+ style="@style/WebNotificationTime"/> |
+ |
+ <TextView |
+ android:id="@+id/body" |
+ android:layout_width="wrap_content" |
+ android:layout_height="wrap_content" |
+ android:layout_toEndOf="@id/icon_frame" |
+ android:layout_alignParentEnd="true" |
+ android:layout_below="@id/title" |
+ android:singleLine="true" |
+ android:ellipsize="end" |
+ style="@style/WebNotificationBody"/> |
+ |
+ <TextView |
+ android:id="@+id/origin" |
+ android:layout_width="wrap_content" |
+ android:layout_height="wrap_content" |
+ android:layout_toEndOf="@id/icon_frame" |
+ android:layout_alignParentEnd="true" |
+ android:layout_below="@id/body" |
+ android:singleLine="true" |
+ android:ellipsize="end" |
+ style="@style/WebNotificationOrigin"/> |
+ |
+</RelativeLayout> |