1<?xml version="1.0" encoding="utf-8"?>
2<!--
3     Copyright (C) 2014 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<LinearLayout
19    xmlns:android="http://schemas.android.com/apk/res/android"
20    android:id="@+id/parentPanel"
21    android:layout_width="match_parent"
22    android:layout_height="wrap_content"
23    android:orientation="vertical"
24    android:background="@drawable/dialog_background_material"
25    android:translationZ="@dimen/floating_window_z"
26    android:layout_marginLeft="@dimen/leanback_alert_dialog_horizontal_margin"
27    android:layout_marginTop="@dimen/leanback_alert_dialog_vertical_margin"
28    android:layout_marginRight="@dimen/leanback_alert_dialog_horizontal_margin"
29    android:layout_marginBottom="@dimen/leanback_alert_dialog_vertical_margin">
30
31    <LinearLayout android:id="@+id/topPanel"
32        android:layout_width="match_parent"
33        android:layout_height="wrap_content"
34        android:orientation="vertical">
35        <LinearLayout android:id="@+id/title_template"
36            android:layout_width="match_parent"
37            android:layout_height="wrap_content"
38            android:orientation="horizontal"
39            android:gravity="center_vertical|start"
40            android:paddingStart="16dip"
41            android:paddingEnd="16dip"
42            android:paddingTop="16dip">
43            <ImageView android:id="@+id/icon"
44                android:layout_width="32dip"
45                android:layout_height="32dip"
46                android:layout_marginEnd="8dip"
47                android:scaleType="fitCenter"
48                android:src="@null" />
49            <TextView android:id="@+id/alertTitle"
50                style="?attr/windowTitleStyle"
51                android:singleLine="true"
52                android:ellipsize="end"
53                android:layout_width="match_parent"
54                android:layout_height="wrap_content"
55                android:textAlignment="viewStart" />
56        </LinearLayout>
57        <!-- If the client uses a customTitle, it will be added here. -->
58    </LinearLayout>
59
60    <LinearLayout android:id="@+id/contentPanel"
61        android:layout_width="match_parent"
62        android:layout_height="wrap_content"
63        android:layout_weight="1"
64        android:orientation="vertical"
65        android:minHeight="64dp">
66        <ScrollView android:id="@+id/scrollView"
67            android:layout_width="match_parent"
68            android:layout_height="wrap_content"
69            android:clipToPadding="false">
70            <TextView android:id="@+id/message"
71                style="?attr/textAppearanceMedium"
72                android:layout_width="match_parent"
73                android:layout_height="wrap_content"
74                android:paddingStart="16dip"
75                android:paddingEnd="16dip"
76                android:paddingTop="16dip" />
77        </ScrollView>
78    </LinearLayout>
79
80    <FrameLayout android:id="@+id/customPanel"
81        android:layout_width="match_parent"
82        android:layout_height="wrap_content"
83        android:layout_weight="1"
84        android:minHeight="64dp">
85        <FrameLayout android:id="@+android:id/custom"
86            android:layout_width="match_parent"
87            android:layout_height="wrap_content" />
88    </FrameLayout>
89
90    <LinearLayout android:id="@+id/buttonPanel"
91        android:layout_width="match_parent"
92        android:layout_height="wrap_content"
93        android:minHeight="@dimen/alert_dialog_button_bar_height"
94        android:orientation="vertical"
95        android:gravity="end"
96        android:padding="16dip">
97        <LinearLayout
98            style="?attr/buttonBarStyle"
99            android:layout_width="wrap_content"
100            android:layout_height="wrap_content"
101            android:layoutDirection="locale">
102            <Button android:id="@+id/button3"
103                style="?attr/buttonBarButtonStyle"
104                android:layout_width="wrap_content"
105                android:layout_height="wrap_content"
106                android:maxLines="2"
107                android:minHeight="@dimen/alert_dialog_button_bar_height" />
108            <Button android:id="@+id/button2"
109                style="?attr/buttonBarButtonStyle"
110                android:layout_width="wrap_content"
111                android:layout_height="wrap_content"
112                android:maxLines="2"
113                android:minHeight="@dimen/alert_dialog_button_bar_height" />
114            <Button android:id="@+id/button1"
115                style="?attr/buttonBarButtonStyle"
116                android:layout_width="wrap_content"
117                android:layout_height="wrap_content"
118                android:maxLines="2"
119                android:minHeight="@dimen/alert_dialog_button_bar_height" />
120        </LinearLayout>
121     </LinearLayout>
122</LinearLayout>
123