alert_dialog.xml revision 637d337b58d8eec6de19230a5dd5ca5581c0478d
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<com.android.internal.widget.WeightedLinearLayout
22    xmlns:android="http://schemas.android.com/apk/res/android"
23    android:id="@+id/parentPanel"
24    android:layout_width="match_parent"
25    android:layout_height="wrap_content"
26    android:orientation="vertical"
27    android:paddingTop="9dip"
28    android:paddingBottom="3dip"
29    android:paddingLeft="3dip"
30    android:paddingRight="1dip"
31    android:majorWeightMin="0.65"
32    android:minorWeightMin="0.9"
33    android:majorWeightMax="0.65">
34
35    <LinearLayout android:id="@+id/topPanel"
36        android:layout_width="match_parent"
37        android:layout_height="wrap_content"
38        android:minHeight="54dip"
39        android:orientation="vertical">
40        <LinearLayout android:id="@+id/title_template"
41            android:layout_width="match_parent"
42            android:layout_height="wrap_content"
43            android:orientation="horizontal"
44            android:gravity="center_vertical"
45            android:layout_marginTop="6dip"
46            android:layout_marginBottom="9dip"
47            android:layout_marginLeft="10dip"
48            android:layout_marginRight="10dip">
49            <ImageView android:id="@+id/icon"
50                android:layout_width="wrap_content"
51                android:layout_height="wrap_content"
52                android:layout_gravity="top"
53                android:paddingTop="6dip"
54                android:paddingRight="10dip"
55                android:src="@drawable/ic_dialog_info" />
56            <com.android.internal.widget.DialogTitle android:id="@+id/alertTitle"
57                style="?android:attr/textAppearanceLarge"
58                android:singleLine="true"
59                android:ellipsize="end"
60                android:layout_width="match_parent"
61                android:layout_height="wrap_content" />
62        </LinearLayout>
63        <ImageView android:id="@+id/titleDivider"
64            android:layout_width="match_parent"
65            android:layout_height="1dip"
66            android:visibility="gone"
67            android:scaleType="fitXY"
68            android:gravity="fill_horizontal"
69            android:src="@android:drawable/divider_horizontal_dark" />
70        <!-- If the client uses a customTitle, it will be added here. -->
71    </LinearLayout>
72
73    <LinearLayout android:id="@+id/contentPanel"
74        android:layout_width="match_parent"
75        android:layout_height="wrap_content"
76        android:layout_weight="1"
77        android:orientation="vertical">
78        <ScrollView android:id="@+id/scrollView"
79            android:layout_width="match_parent"
80            android:layout_height="wrap_content"
81            android:paddingTop="2dip"
82            android:paddingBottom="12dip"
83            android:paddingLeft="14dip"
84            android:paddingRight="10dip"
85            android:overScrollMode="ifContentScrolls">
86            <TextView android:id="@+id/message"
87                style="?android:attr/textAppearanceMedium"
88                android:layout_width="match_parent"
89                android:layout_height="wrap_content"
90                android:padding="5dip" />
91        </ScrollView>
92    </LinearLayout>
93
94    <FrameLayout android:id="@+id/customPanel"
95        android:layout_width="match_parent"
96        android:layout_height="wrap_content"
97        android:layout_weight="1">
98        <FrameLayout android:id="@+android:id/custom"
99            android:layout_width="match_parent"
100            android:layout_height="wrap_content"
101            android:paddingTop="5dip"
102            android:paddingBottom="5dip" />
103    </FrameLayout>
104
105    <LinearLayout android:id="@+id/buttonPanel"
106        android:layout_width="match_parent"
107        android:layout_height="wrap_content"
108        android:minHeight="54dip"
109        android:orientation="vertical" >
110        <ButtonGroup
111            style="?android:attr/alertDialogButtonGroupStyle"
112            android:layout_width="match_parent"
113            android:layout_height="wrap_content"
114            android:orientation="horizontal"
115            android:paddingTop="4dip"
116            android:paddingLeft="2dip"
117            android:paddingRight="2dip"
118            android:measureWithLargestChild="true">
119            <LinearLayout android:id="@+id/leftSpacer"
120                android:layout_weight="0.25"
121                android:layout_width="0dip"
122                android:layout_height="wrap_content"
123                android:orientation="horizontal"
124                android:visibility="gone" />
125            <Button android:id="@+id/button1"
126                android:layout_width="0dip"
127                android:layout_gravity="left"
128                android:layout_weight="1"
129                android:maxLines="2"
130                android:layout_height="wrap_content" />
131            <Button android:id="@+id/button3"
132                android:layout_width="0dip"
133                android:layout_gravity="center_horizontal"
134                android:layout_weight="1"
135                android:maxLines="2"
136                android:layout_height="wrap_content" />
137            <Button android:id="@+id/button2"
138                android:layout_width="0dip"
139                android:layout_gravity="right"
140                android:layout_weight="1"
141                android:maxLines="2"
142                android:layout_height="wrap_content" />
143            <LinearLayout android:id="@+id/rightSpacer"
144                android:layout_width="0dip"
145                android:layout_weight="0.25"
146                android:layout_height="wrap_content"
147                android:orientation="horizontal"
148                android:visibility="gone" />
149        </ButtonGroup>
150     </LinearLayout>
151</com.android.internal.widget.WeightedLinearLayout>
152