OLD | NEW |
(Empty) | |
| 1 <?xml version="1.0" encoding="utf-8"?> |
| 2 <!-- Copyright 2015 The Chromium Authors. All rights reserved. |
| 3 Use of this source code is governed by a BSD-style license that can be |
| 4 found in the LICENSE file. --> |
| 5 |
| 6 <!-- |
| 7 Web notification custom layout. |
| 8 _______________________________________________________ |
| 9 | | | |
| 10 | | Title text 1:23 pm | |
| 11 | Icon | Body text | |
| 12 | | https://www.example.com/ | |
| 13 |________|____________________________________________| |
| 14 --> |
| 15 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| 16 android:layout_width="match_parent" |
| 17 android:layout_height="wrap_content"> |
| 18 |
| 19 <FrameLayout |
| 20 android:id="@+id/icon_frame" |
| 21 android:layout_width="@android:dimen/notification_large_icon_width" |
| 22 android:layout_height="@android:dimen/notification_large_icon_height" |
| 23 android:layout_alignParentStart="true"> |
| 24 |
| 25 <ImageView |
| 26 android:id="@+id/icon" |
| 27 android:layout_width="match_parent" |
| 28 android:layout_height="match_parent" |
| 29 android:scaleType="centerInside" |
| 30 android:contentDescription="@null"/> |
| 31 |
| 32 <ImageView |
| 33 android:layout_width="wrap_content" |
| 34 android:layout_height="wrap_content" |
| 35 android:layout_gravity="bottom|end" |
| 36 android:contentDescription="@null" |
| 37 android:src="@drawable/ic_chrome"/> |
| 38 |
| 39 </FrameLayout> |
| 40 |
| 41 <TextView |
| 42 android:id="@+id/title" |
| 43 android:layout_width="wrap_content" |
| 44 android:layout_height="wrap_content" |
| 45 android:layout_toEndOf="@id/icon_frame" |
| 46 android:layout_toStartOf="@id/time" |
| 47 android:layout_alignParentTop="true" |
| 48 android:singleLine="true" |
| 49 android:ellipsize="end" |
| 50 style="@style/WebNotificationTitle"/> |
| 51 |
| 52 <TextView |
| 53 android:id="@+id/time" |
| 54 android:layout_width="wrap_content" |
| 55 android:layout_height="wrap_content" |
| 56 android:layout_alignParentEnd="true" |
| 57 android:layout_alignParentTop="true" |
| 58 android:singleLine="true" |
| 59 style="@style/WebNotificationTime"/> |
| 60 |
| 61 <TextView |
| 62 android:id="@+id/body" |
| 63 android:layout_width="wrap_content" |
| 64 android:layout_height="wrap_content" |
| 65 android:layout_toEndOf="@id/icon_frame" |
| 66 android:layout_alignParentEnd="true" |
| 67 android:layout_below="@id/title" |
| 68 android:singleLine="true" |
| 69 android:ellipsize="end" |
| 70 style="@style/WebNotificationBody"/> |
| 71 |
| 72 <TextView |
| 73 android:id="@+id/origin" |
| 74 android:layout_width="wrap_content" |
| 75 android:layout_height="wrap_content" |
| 76 android:layout_toEndOf="@id/icon_frame" |
| 77 android:layout_alignParentEnd="true" |
| 78 android:layout_below="@id/body" |
| 79 android:singleLine="true" |
| 80 android:ellipsize="end" |
| 81 style="@style/WebNotificationOrigin"/> |
| 82 |
| 83 </RelativeLayout> |
OLD | NEW |