alert_dialog.xml revision f013e1afd1e68af5e3b868c26a653bbfb39538f8
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="fill_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="fill_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="fill_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="fill_parent" 
58                android:layout_height="wrap_content" />
59        </LinearLayout>
60        <ImageView android:id="@+id/titleDivider"
61            android:layout_width="fill_parent"
62            android:layout_height="1dip"
63            android:visibility="gone"
64            android:scaleType="fitXY"
65            android:gravity="fill_horizontal"
66            android:src="@android:drawable/dialog_divider_horizontal_light"
67            android:layout_marginLeft="10dip"
68            android:layout_marginRight="10dip"/>
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="fill_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="fill_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="fill_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="fill_parent"
94        android:layout_height="wrap_content"
95        android:layout_weight="1">
96        <FrameLayout android:id="@+android:id/custom"
97            android:layout_width="fill_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="fill_parent"
105        android:layout_height="wrap_content"
106        android:minHeight="54dip"
107        android:orientation="vertical" >     
108        <LinearLayout 
109            android:layout_width="fill_parent"
110            android:layout_height="wrap_content"
111            android:orientation="horizontal"
112            android:paddingTop="4dip"
113            android:paddingLeft="2dip"
114            android:paddingRight="2dip" >
115            <LinearLayout android:id="@+id/leftSpacer"
116                android:layout_weight="0.25"
117                android:layout_width="0dip"
118                android:layout_height="wrap_content"
119                android:orientation="horizontal"
120                android:visibility="gone" />
121            <Button android:id="@+id/button1"
122                android:layout_width="0dip"
123                android:layout_gravity="left"
124                android:layout_weight="1"
125                android:maxLines="2"
126                android:layout_height="wrap_content" />
127            <Button android:id="@+id/button3"
128                android:layout_width="0dip"
129                android:layout_gravity="center_horizontal"
130                android:layout_weight="1"
131                android:maxLines="2"
132                android:layout_height="wrap_content" />
133            <Button android:id="@+id/button2"
134                android:layout_width="0dip"
135                android:layout_gravity="right"
136                android:layout_weight="1"
137                android:maxLines="2"
138                android:layout_height="wrap_content" />
139            <LinearLayout android:id="@+id/rightSpacer"
140                android:layout_width="0dip"
141                android:layout_weight="0.25"
142                android:layout_height="wrap_content"
143                android:orientation="horizontal"
144                android:visibility="gone" />
145        </LinearLayout>
146     </LinearLayout>
147</LinearLayout>
148