1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  Copyright (C) 2021 The Android Open Source Project
4
5  Licensed under the Apache License, Version 2.0 (the "License");
6  you may not use this file except in compliance with the License.
7  You may obtain a copy of the License at
8
9       http://www.apache.org/licenses/LICENSE-2.0
10
11  Unless required by applicable law or agreed to in writing, software
12  distributed under the License is distributed on an "AS IS" BASIS,
13  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  See the License for the specific language governing permissions and
15  limitations under the License.
16  -->
17
18<com.android.settingslib.widget.BannerMessageView
19    xmlns:android="http://schemas.android.com/apk/res/android"
20    android:layout_width="match_parent"
21    android:layout_height="wrap_content"
22    android:orientation="vertical"
23    style="@style/Banner.Preference.SettingsLib">
24
25    <RelativeLayout
26        android:id="@+id/top_row"
27        android:layout_width="match_parent"
28        android:layout_height="wrap_content"
29        android:paddingBottom="8dp"
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:layout_alignParentStart="true"
37            android:importantForAccessibility="no" />
38
39        <ImageButton
40            android:id="@+id/banner_dismiss_btn"
41            android:layout_width="wrap_content"
42            android:layout_height="wrap_content"
43            android:src="@drawable/settingslib_ic_cross"
44            android:layout_alignParentEnd="true"
45            android:contentDescription="@string/accessibility_banner_message_dismiss"
46            style="@style/Banner.Dismiss.SettingsLib" />
47    </RelativeLayout>
48
49    <TextView
50        android:id="@+id/banner_title"
51        android:layout_width="wrap_content"
52        android:layout_height="wrap_content"
53        android:layout_gravity="start"
54        android:textAlignment="viewStart"
55        android:paddingTop="0dp"
56        android:paddingBottom="4dp"
57        android:textAppearance="@style/Banner.Title.SettingsLib"/>
58
59    <TextView
60        android:id="@+id/banner_subtitle"
61        android:layout_width="wrap_content"
62        android:layout_height="wrap_content"
63        android:layout_gravity="start"
64        android:textAlignment="viewStart"
65        android:paddingTop="0dp"
66        android:paddingBottom="4dp"
67        android:textAppearance="@style/Banner.Subtitle.SettingsLib"
68        android:visibility="gone"/>
69
70    <TextView
71        android:id="@+id/banner_summary"
72        android:layout_width="wrap_content"
73        android:layout_height="wrap_content"
74        android:layout_gravity="start"
75        android:textAlignment="viewStart"
76        android:paddingTop="4dp"
77        android:paddingBottom="8dp"
78        android:textAppearance="@style/Banner.Summary.SettingsLib"/>
79
80    <LinearLayout
81        android:layout_width="match_parent"
82        android:layout_height="wrap_content"
83        android:orientation="horizontal"
84        android:minHeight="8dp"
85        android:gravity="end">
86
87        <Button
88            android:id="@+id/banner_negative_btn"
89            android:layout_width="wrap_content"
90            android:layout_height="wrap_content"
91            style="@style/Banner.ButtonText.SettingsLib"/>
92
93        <Button
94            android:id="@+id/banner_positive_btn"
95            android:layout_width="wrap_content"
96            android:layout_height="wrap_content"
97            style="@style/Banner.ButtonText.SettingsLib"/>
98    </LinearLayout>
99</com.android.settingslib.widget.BannerMessageView>