alert_dialog_material.xml revision 469b0c1f23babe935ff660d3c451db245ca2ed3d
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
25    <LinearLayout android:id="@+id/topPanel"
26        android:layout_width="match_parent"
27        android:layout_height="wrap_content"
28        android:orientation="vertical">
29        <LinearLayout android:id="@+id/title_template"
30            android:layout_width="match_parent"
31            android:layout_height="wrap_content"
32            android:orientation="horizontal"
33            android:gravity="center_vertical|start"
34            android:paddingStart="@dimen/alert_dialog_padding_material"
35            android:paddingEnd="@dimen/alert_dialog_padding_material"
36            android:paddingTop="@dimen/alert_dialog_padding_material"
37            android:paddingBottom="8dip">
38            <ImageView android:id="@+id/icon"
39                android:layout_width="32dip"
40                android:layout_height="32dip"
41                android:layout_marginEnd="8dip"
42                android:scaleType="fitCenter"
43                android:src="@null" />
44            <com.android.internal.widget.DialogTitle android:id="@+id/alertTitle"
45                style="?attr/windowTitleStyle"
46                android:singleLine="true"
47                android:ellipsize="end"
48                android:layout_width="match_parent"
49                android:layout_height="wrap_content"
50                android:textAlignment="viewStart" />
51        </LinearLayout>
52        <!-- If the client uses a customTitle, it will be added here. -->
53    </LinearLayout>
54
55    <LinearLayout android:id="@+id/contentPanel"
56        android:layout_width="match_parent"
57        android:layout_height="wrap_content"
58        android:layout_weight="1"
59        android:orientation="vertical"
60        android:minHeight="64dp">
61        <ScrollView android:id="@+id/scrollView"
62            android:layout_width="match_parent"
63            android:layout_height="wrap_content"
64            android:clipToPadding="false">
65            <TextView android:id="@+id/message"
66                style="?attr/textAppearanceMedium"
67                android:layout_width="match_parent"
68                android:layout_height="wrap_content"
69                android:paddingStart="@dimen/alert_dialog_padding_material"
70                android:paddingEnd="@dimen/alert_dialog_padding_material"
71                android:paddingTop="@dimen/alert_dialog_padding_material"
72                android:paddingBottom="@dimen/alert_dialog_padding_material" />
73        </ScrollView>
74    </LinearLayout>
75
76    <FrameLayout android:id="@+id/customPanel"
77        android:layout_width="match_parent"
78        android:layout_height="wrap_content"
79        android:layout_weight="1"
80        android:minHeight="64dp">
81        <FrameLayout android:id="@+id/custom"
82            android:layout_width="match_parent"
83            android:layout_height="wrap_content" />
84    </FrameLayout>
85
86    <LinearLayout android:id="@+id/buttonPanel"
87        style="?attr/buttonBarStyle"
88        android:layout_width="match_parent"
89        android:layout_height="wrap_content"
90        android:layoutDirection="locale"
91        android:orientation="horizontal"
92        android:paddingStart="6dp"
93        android:paddingEnd="6dp"
94        android:paddingBottom="6dp">
95        <Button android:id="@+id/button3"
96            style="?attr/buttonBarNeutralButtonStyle"
97            android:layout_width="wrap_content"
98            android:layout_height="wrap_content"
99            android:maxLines="2"
100            android:minHeight="@dimen/alert_dialog_button_bar_height" />
101        <Space
102            android:layout_width="0dp"
103            android:layout_height="0dp"
104            android:layout_weight="1"
105            android:visibility="invisible" />
106        <Button android:id="@+id/button2"
107            style="?attr/buttonBarNegativeButtonStyle"
108            android:layout_width="wrap_content"
109            android:layout_height="wrap_content"
110            android:maxLines="2"
111            android:minHeight="@dimen/alert_dialog_button_bar_height" />
112        <Button android:id="@+id/button1"
113            style="?attr/buttonBarPositiveButtonStyle"
114            android:layout_width="wrap_content"
115            android:layout_height="wrap_content"
116            android:maxLines="2"
117            android:minHeight="@dimen/alert_dialog_button_bar_height" />
118    </LinearLayout>
119</LinearLayout>
120