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:paddingTop="0dp"
54        android:paddingBottom="4dp"
55        android:textAppearance="@style/Banner.Title.SettingsLib"/>
56
57    <TextView
58        android:id="@+id/banner_subtitle"
59        android:layout_width="wrap_content"
60        android:layout_height="wrap_content"
61        android:paddingTop="0dp"
62        android:paddingBottom="4dp"
63        android:textAppearance="@style/Banner.Subtitle.SettingsLib"
64        android:visibility="gone"/>
65
66    <TextView
67        android:id="@+id/banner_summary"
68        android:layout_width="wrap_content"
69        android:layout_height="wrap_content"
70        android:paddingTop="4dp"
71        android:paddingBottom="8dp"
72        android:textAppearance="@style/Banner.Summary.SettingsLib"/>
73
74    <LinearLayout
75        android:layout_width="match_parent"
76        android:layout_height="wrap_content"
77        android:orientation="horizontal"
78        android:minHeight="8dp"
79        android:gravity="end">
80
81        <Button
82            android:id="@+id/banner_negative_btn"
83            android:layout_width="wrap_content"
84            android:layout_height="wrap_content"
85            style="@style/Banner.ButtonText.SettingsLib"/>
86
87        <Button
88            android:id="@+id/banner_positive_btn"
89            android:layout_width="wrap_content"
90            android:layout_height="wrap_content"
91            style="@style/Banner.ButtonText.SettingsLib"/>
92    </LinearLayout>
93</com.android.settingslib.widget.BannerMessageView>