alert_dialog.xml revision cf0357639e952a87f0d535c82691919af81f058b
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 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 android:overScrollMode="ifContentScrolls"> 85 <TextView android:id="@+id/message" 86 style="?android:attr/textAppearanceMedium" 87 android:layout_width="match_parent" 88 android:layout_height="wrap_content" 89 android:padding="5dip" /> 90 </ScrollView> 91 </LinearLayout> 92 93 <FrameLayout android:id="@+id/customPanel" 94 android:layout_width="match_parent" 95 android:layout_height="wrap_content" 96 android:layout_weight="1"> 97 <FrameLayout android:id="@+android:id/custom" 98 android:layout_width="match_parent" 99 android:layout_height="wrap_content" 100 android:paddingTop="5dip" 101 android:paddingBottom="5dip" /> 102 </FrameLayout> 103 104 <LinearLayout android:id="@+id/buttonPanel" 105 android:layout_width="match_parent" 106 android:layout_height="wrap_content" 107 android:minHeight="54dip" 108 android:orientation="vertical" > 109 <LinearLayout 110 style="?android:attr/buttonBarStyle" 111 android:layout_width="match_parent" 112 android:layout_height="wrap_content" 113 android:orientation="horizontal" 114 android:paddingTop="4dip" 115 android:paddingLeft="2dip" 116 android:paddingRight="2dip" 117 android:measureWithLargestChild="true"> 118 <LinearLayout android:id="@+id/leftSpacer" 119 android:layout_weight="0.25" 120 android:layout_width="0dip" 121 android:layout_height="wrap_content" 122 android:orientation="horizontal" 123 android:visibility="gone" /> 124 <Button android:id="@+id/button1" 125 android:layout_width="0dip" 126 android:layout_gravity="left" 127 android:layout_weight="1" 128 style="?android:attr/buttonBarButtonStyle" 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 style="?android:attr/buttonBarButtonStyle" 136 android:maxLines="2" 137 android:layout_height="wrap_content" /> 138 <Button android:id="@+id/button2" 139 android:layout_width="0dip" 140 android:layout_gravity="right" 141 android:layout_weight="1" 142 style="?android:attr/buttonBarButtonStyle" 143 android:maxLines="2" 144 android:layout_height="wrap_content" /> 145 <LinearLayout android:id="@+id/rightSpacer" 146 android:layout_width="0dip" 147 android:layout_weight="0.25" 148 android:layout_height="wrap_content" 149 android:orientation="horizontal" 150 android:visibility="gone" /> 151 </LinearLayout> 152 </LinearLayout> 153</com.android.internal.widget.WeightedLinearLayout> 154