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