alert_dialog.xml revision 5b1b2417106f161e4bc66296888f4685f213eebd
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3/* //device/apps/common/res/layout/alert_dialog.xml
4**
5** Copyright 2006, The Android Open Source Project
6**
7** Licensed under the Apache License, Version 2.0 (the "License");
8** you may not use this file except in compliance with the License.
9** You may obtain a copy of the License at
10**
11**     http://www.apache.org/licenses/LICENSE-2.0
12**
13** Unless required by applicable law or agreed to in writing, software
14** distributed under the License is distributed on an "AS IS" BASIS,
15** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16** See the License for the specific language governing permissions and
17** limitations under the License.
18*/
19-->
20
21<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
22    android:id="@+id/parentPanel"
23    android:layout_width="match_parent"
24    android:layout_height="wrap_content"
25    android:orientation="vertical"
26    android:paddingTop="9dip"
27    android:paddingBottom="3dip"
28    android:paddingLeft="3dip"
29    android:paddingRight="1dip"
30    >
31
32    <LinearLayout android:id="@+id/topPanel"
33        android:layout_width="match_parent"
34        android:layout_height="wrap_content"
35        android:minHeight="54dip"
36        android:orientation="vertical">
37        <LinearLayout android:id="@+id/title_template"
38            android:layout_width="match_parent"
39            android:layout_height="wrap_content"
40            android:orientation="horizontal"
41            android:gravity="center_vertical"
42            android:layout_marginTop="6dip"
43            android:layout_marginBottom="9dip"
44            android:layout_marginLeft="10dip"
45            android:layout_marginRight="10dip">
46            <ImageView android:id="@+id/icon"
47                android:layout_width="wrap_content"
48                android:layout_height="wrap_content"
49                android:layout_gravity="top"
50                android:paddingTop="6dip"
51                android:paddingRight="10dip"
52                android:src="@drawable/ic_dialog_info" />
53            <com.android.internal.widget.DialogTitle android:id="@+id/alertTitle"
54                style="?android:attr/textAppearanceLarge"
55                android:singleLine="true"
56                android:ellipsize="end"
57                android:layout_width="match_parent"
58                android:layout_height="wrap_content" />
59        </LinearLayout>
60        <ImageView android:id="@+id/titleDivider"
61            android:layout_width="match_parent"
62            android:layout_height="1dip"
63            android:visibility="gone"
64            android:scaleType="fitXY"
65            android:gravity="fill_horizontal"
66            android:src="@android:drawable/divider_horizontal_dark" />
67        <!-- If the client uses a customTitle, it will be added here. -->
68    </LinearLayout>
69
70    <LinearLayout android:id="@+id/contentPanel"
71        android:layout_width="match_parent"
72        android:layout_height="wrap_content"
73        android:layout_weight="1"
74        android:orientation="vertical">
75        <ScrollView android:id="@+id/scrollView"
76            android:layout_width="match_parent"
77            android:layout_height="wrap_content"
78            android:paddingTop="2dip"
79            android:paddingBottom="12dip"
80            android:paddingLeft="14dip"
81            android:paddingRight="10dip">
82            <TextView android:id="@+id/message"
83                style="?android:attr/textAppearanceMedium"
84                android:layout_width="match_parent"
85                android:layout_height="wrap_content"
86                android:padding="5dip" />
87        </ScrollView>
88    </LinearLayout>
89
90    <FrameLayout android:id="@+id/customPanel"
91        android:layout_width="match_parent"
92        android:layout_height="wrap_content"
93        android:layout_weight="1">
94        <FrameLayout android:id="@+android:id/custom"
95            android:layout_width="match_parent"
96            android:layout_height="wrap_content"
97            android:paddingTop="5dip"
98            android:paddingBottom="5dip" />
99    </FrameLayout>
100
101    <LinearLayout android:id="@+id/buttonPanel"
102        android:layout_width="match_parent"
103        android:layout_height="wrap_content"
104        android:minHeight="54dip"
105        android:orientation="vertical" >
106        <LinearLayout
107            android:layout_width="match_parent"
108            android:layout_height="wrap_content"
109            android:orientation="horizontal"
110            android:paddingTop="4dip"
111            android:paddingLeft="2dip"
112            android:paddingRight="2dip"
113            android:useLargestChild="true">
114            <LinearLayout android:id="@+id/leftSpacer"
115                android:layout_weight="0.25"
116                android:layout_width="0dip"
117                android:layout_height="wrap_content"
118                android:orientation="horizontal"
119                android:visibility="gone" />
120            <Button android:id="@+id/button1"
121                android:layout_width="0dip"
122                android:layout_gravity="left"
123                android:layout_weight="1"
124                android:maxLines="2"
125                android:layout_height="wrap_content" />
126            <Button android:id="@+id/button3"
127                android:layout_width="0dip"
128                android:layout_gravity="center_horizontal"
129                android:layout_weight="1"
130                android:maxLines="2"
131                android:layout_height="wrap_content" />
132            <Button android:id="@+id/button2"
133                android:layout_width="0dip"
134                android:layout_gravity="right"
135                android:layout_weight="1"
136                android:maxLines="2"
137                android:layout_height="wrap_content" />
138            <LinearLayout android:id="@+id/rightSpacer"
139                android:layout_width="0dip"
140                android:layout_weight="0.25"
141                android:layout_height="wrap_content"
142                android:orientation="horizontal"
143                android:visibility="gone" />
144        </LinearLayout>
145     </LinearLayout>
146</LinearLayout>
147