alert_dialog_material.xml revision 304a13b25bf9e35afb83df83202c271fd2685126
1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 Copyright (C) 2014 The Android Open Source Project 4 5 Licensed under the Apache License, Version 2.0 (the "License"); 6 you may not use this file except in compliance with the License. 7 You may obtain a copy of the License at 8 9 http://www.apache.org/licenses/LICENSE-2.0 10 11 Unless required by applicable law or agreed to in writing, software 12 distributed under the License is distributed on an "AS IS" BASIS, 13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 See the License for the specific language governing permissions and 15 limitations under the License. 16--> 17 18<LinearLayout 19 xmlns:android="http://schemas.android.com/apk/res/android" 20 android:id="@+id/parentPanel" 21 android:layout_width="match_parent" 22 android:layout_height="wrap_content" 23 android:orientation="vertical"> 24 25 <LinearLayout android:id="@+id/topPanel" 26 android:layout_width="match_parent" 27 android:layout_height="wrap_content" 28 android:orientation="vertical"> 29 <LinearLayout android:id="@+id/title_template" 30 android:layout_width="match_parent" 31 android:layout_height="wrap_content" 32 android:orientation="horizontal" 33 android:gravity="center_vertical|start" 34 android:paddingStart="@dimen/alert_dialog_padding_material" 35 android:paddingEnd="@dimen/alert_dialog_padding_material" 36 android:paddingTop="@dimen/alert_dialog_padding_top_material" 37 android:paddingBottom="12dip"> 38 <ImageView android:id="@+id/icon" 39 android:layout_width="32dip" 40 android:layout_height="32dip" 41 android:layout_marginEnd="8dip" 42 android:scaleType="fitCenter" 43 android:src="@null" /> 44 <com.android.internal.widget.DialogTitle android:id="@+id/alertTitle" 45 style="?attr/windowTitleStyle" 46 android:singleLine="true" 47 android:ellipsize="end" 48 android:layout_width="match_parent" 49 android:layout_height="wrap_content" 50 android:textAlignment="viewStart" /> 51 </LinearLayout> 52 <!-- If the client uses a customTitle, it will be added here. --> 53 </LinearLayout> 54 55 <LinearLayout android:id="@+id/contentPanel" 56 android:layout_width="match_parent" 57 android:layout_height="wrap_content" 58 android:layout_weight="1" 59 android:orientation="vertical" 60 android:minHeight="64dp"> 61 <ScrollView android:id="@+id/scrollView" 62 android:layout_width="match_parent" 63 android:layout_height="wrap_content" 64 android:clipToPadding="false"> 65 <TextView android:id="@+id/message" 66 style="?attr/textAppearanceMedium" 67 android:layout_width="match_parent" 68 android:layout_height="wrap_content" 69 android:paddingStart="@dimen/alert_dialog_padding_material" 70 android:paddingEnd="@dimen/alert_dialog_padding_material" /> 71 </ScrollView> 72 </LinearLayout> 73 74 <FrameLayout android:id="@+id/customPanel" 75 android:layout_width="match_parent" 76 android:layout_height="wrap_content" 77 android:layout_weight="1" 78 android:minHeight="48dp"> 79 <FrameLayout android:id="@+id/custom" 80 android:layout_width="match_parent" 81 android:layout_height="wrap_content" /> 82 </FrameLayout> 83 84 <LinearLayout android:id="@+id/buttonPanel" 85 style="?attr/buttonBarStyle" 86 android:layout_width="match_parent" 87 android:layout_height="wrap_content" 88 android:layoutDirection="locale" 89 android:orientation="horizontal" 90 android:paddingStart="12dp" 91 android:paddingEnd="12dp" 92 android:paddingTop="8dp" 93 android:paddingBottom="8dp"> 94 <Button android:id="@+id/button3" 95 style="?attr/buttonBarNeutralButtonStyle" 96 android:layout_width="wrap_content" 97 android:layout_height="wrap_content" /> 98 <Space 99 android:layout_width="0dp" 100 android:layout_height="0dp" 101 android:layout_weight="1" 102 android:visibility="invisible" /> 103 <Button android:id="@+id/button2" 104 style="?attr/buttonBarNegativeButtonStyle" 105 android:layout_width="wrap_content" 106 android:layout_height="wrap_content" /> 107 <Button android:id="@+id/button1" 108 style="?attr/buttonBarPositiveButtonStyle" 109 android:layout_width="wrap_content" 110 android:layout_height="wrap_content" /> 111 </LinearLayout> 112</LinearLayout> 113