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..3e962ad40490b04cbc0293bbbc902ee6ddc048a5 |
--- /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 compact layout. |
Peter Beverloo
2015/10/12 14:08:30
note: it's going to be a while before I can comfor
Michael van Ouwerkerk
2015/10/12 17:10:59
That's a cool article. As it states, this matters
|
+ _______________________________________________________ |
+ | | | |
+ | | Title text 1:23 pm | |
+ | Icon | Body text | |
+ | | https://www.example.com/ | |
+ |________|____________________________________________| |
+--> |
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
+ 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" |
+ android:contentDescription="@null"/> |
+ |
+ <ImageView |
+ android:layout_width="match_parent" |
+ 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" |
Peter Beverloo
2015/10/12 14:08:30
moan: how lovely
Michael van Ouwerkerk
2015/10/12 17:10:59
Yeah, the weight does it.
|
+ 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> |