| <?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. |
| _______________________________________________________ |
| | | | |
| | Icon | Title text 1:23 pm | |
| | | Body text | |
| | | www.example.com | |
| |________|____________________________________________| |
| --> |
| <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content"> |
| |
| <include layout="@layout/web_notification_icon_frame" |
| android:id="@+id/icon_frame"/> |
| |
| <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_alignBaseline="@id/title" |
| android:layout_alignParentEnd="true" |
| android:layout_alignParentTop="true" |
| android:layout_marginEnd="8dp" |
| android:layout_marginStart="8dp" |
| android:singleLine="true" |
| style="@style/WebNotificationTime"/> |
| |
| <RelativeLayout |
| android:id="@+id/body_container" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:layout_below="@id/title" |
| android:layout_toEndOf="@id/icon_frame" |
| android:layout_marginBottom="-4dp" |
| android:layout_marginTop="-4dp"> |
| |
| <TextView |
| android:id="@+id/body" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:layout_alignWithParentIfMissing="true" |
| android:layout_alignParentStart="true" |
| android:layout_alignParentTop="true" |
| android:layout_toStartOf="@+id/work_profile_badge" |
| android:layout_marginEnd="8dp" |
| android:singleLine="true" |
| android:ellipsize="end" |
| style="@style/WebNotificationBody"/> |
| |
| <ImageView |
| android:id="@id/work_profile_badge" |
| android:layout_width="16dp" |
| android:layout_height="16dp" |
| android:layout_marginEnd="8dp" |
| android:layout_alignParentEnd="true" |
| android:layout_alignParentTop="true" |
| android:layout_marginTop="1dp" |
| android:scaleType="centerInside" |
| android:contentDescription="@string/notification_work_profile_badge_content_description" |
| android:visibility="gone"/> |
| |
| </RelativeLayout> |
| |
| <TextView |
| android:id="@+id/origin" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:layout_toEndOf="@id/icon_frame" |
| android:layout_toStartOf="@+id/small_icon_footer" |
| android:layout_below="@id/body_container" |
| android:layout_marginEnd="8dp" |
| android:singleLine="true" |
| android:ellipsize="start" |
| style="@style/WebNotificationOrigin"/> |
| |
| <ViewStub |
| android:id="@id/small_icon_footer" |
| android:inflatedId="@id/small_icon_footer" |
| android:layout="@layout/web_notification_small_icon" |
| android:layout_width="16dp" |
| android:layout_height="16dp" |
| android:layout_marginEnd="8dp" |
| android:layout_alignParentEnd="true" |
| android:layout_below="@id/body_container"/> |
| |
| </RelativeLayout> |