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

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

Issue 1394423004: Initial skeleton of custom layouts for Web Notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 2 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
« no previous file with comments | « no previous file | chrome/android/java/res/values-v17/styles.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | chrome/android/java/res/values-v17/styles.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698