1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2020 The Android Open Source Project
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7
8          http://www.apache.org/licenses/LICENSE-2.0
9
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15-->
16
17<LinearLayout
18    xmlns:android="http://schemas.android.com/apk/res/android"
19    android:layout_width="match_parent"
20    android:layout_height="wrap_content"
21    android:paddingStart="24dp"
22    android:paddingEnd="16dp"
23    android:paddingTop="24dp"
24    android:paddingBottom="8dp"
25    android:orientation="vertical">
26
27    <LinearLayout
28        android:layout_width="match_parent"
29        android:layout_height="wrap_content"
30        android:orientation="horizontal">
31
32        <ImageView
33            android:id="@+id/banner_icon"
34            android:layout_width="24dp"
35            android:layout_height="24dp"
36            android:importantForAccessibility="no"
37            android:src="@drawable/ic_warning"/>
38
39        <LinearLayout
40            android:layout_width="match_parent"
41            android:layout_height="wrap_content"
42            android:layout_marginStart="24dp"
43            android:orientation="vertical">
44
45            <TextView
46                android:id="@+id/banner_title"
47                android:layout_width="wrap_content"
48                android:layout_height="wrap_content"
49                android:textAppearance="@style/Banner.Text.Title"/>
50            <TextView
51                android:id="@+id/banner_summary"
52                android:layout_width="wrap_content"
53                android:layout_height="wrap_content"
54                android:textAppearance="@style/Banner.Text.Summary"/>
55        </LinearLayout>
56    </LinearLayout>
57
58    <LinearLayout
59        android:layout_width="match_parent"
60        android:layout_height="wrap_content"
61        android:orientation="horizontal"
62        android:gravity="end">
63        <Button
64            android:id="@+id/banner_negative_btn"
65            android:layout_width="wrap_content"
66            android:layout_height="wrap_content"
67            style="@android:style/Widget.DeviceDefault.Button.Borderless.Colored"/>
68
69        <Button
70            android:id="@+id/banner_positive_btn"
71            android:layout_width="wrap_content"
72            android:layout_height="wrap_content"
73            style="@android:style/Widget.DeviceDefault.Button.Borderless.Colored"/>
74    </LinearLayout>
75
76    <!-- Not supported before v31 -->
77    <TextView
78        android:id="@+id/banner_subtitle"
79        android:layout_width="wrap_content"
80        android:layout_height="wrap_content"
81        android:visibility="gone"/>
82
83    <!-- Not supported before v31 -->
84    <ImageButton
85        android:id="@+id/banner_dismiss_btn"
86        android:layout_width="wrap_content"
87        android:layout_height="wrap_content"
88        android:contentDescription="@string/accessibility_banner_message_dismiss"
89        android:visibility="gone"/>
90</LinearLayout>