alert_dialog_material.xml revision 85085343b378f00a34448b69e582226fa584b005
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 <ImageView android:id="@+id/icon" 38 android:layout_width="32dip" 39 android:layout_height="32dip" 40 android:layout_marginEnd="8dip" 41 android:scaleType="fitCenter" 42 android:src="@null" /> 43 <com.android.internal.widget.DialogTitle android:id="@+id/alertTitle" 44 style="?attr/windowTitleStyle" 45 android:singleLine="true" 46 android:ellipsize="end" 47 android:layout_width="match_parent" 48 android:layout_height="wrap_content" 49 android:textAlignment="viewStart" /> 50 </LinearLayout> 51 <!-- If the client uses a customTitle, it will be added here. --> 52 </LinearLayout> 53 54 <LinearLayout android:id="@+id/contentPanel" 55 android:layout_width="match_parent" 56 android:layout_height="wrap_content" 57 android:layout_weight="1" 58 android:orientation="vertical" 59 android:minHeight="48dp"> 60 <ScrollView android:id="@+id/scrollView" 61 android:layout_width="match_parent" 62 android:layout_height="wrap_content" 63 android:clipToPadding="false"> 64 <LinearLayout 65 android:layout_width="match_parent" 66 android:layout_height="wrap_content" 67 android:orientation="vertical"> 68 <TextView android:id="@+id/message" 69 style="@style/TextAppearance.Material.Subhead" 70 android:layout_width="match_parent" 71 android:layout_height="wrap_content" 72 android:paddingStart="@dimen/alert_dialog_padding_material" 73 android:paddingTop="@dimen/alert_dialog_padding_top_material" 74 android:paddingEnd="@dimen/alert_dialog_padding_material" /> 75 <Space android:id="@+id/textSpacerNoButtons" 76 android:visibility="gone" 77 android:layout_width="0dp" 78 android:layout_height="@dimen/alert_dialog_padding_top_material" /> 79 </LinearLayout> 80 </ScrollView> 81 </LinearLayout> 82 83 <FrameLayout android:id="@+id/customPanel" 84 android:layout_width="match_parent" 85 android:layout_height="wrap_content" 86 android:layout_weight="1" 87 android:minHeight="48dp"> 88 <FrameLayout android:id="@+id/custom" 89 android:layout_width="match_parent" 90 android:layout_height="wrap_content" /> 91 </FrameLayout> 92 93 <LinearLayout android:id="@+id/buttonPanel" 94 style="?attr/buttonBarStyle" 95 android:layout_width="match_parent" 96 android:layout_height="wrap_content" 97 android:layoutDirection="locale" 98 android:orientation="horizontal" 99 android:paddingStart="12dp" 100 android:paddingEnd="12dp" 101 android:paddingTop="8dp" 102 android:paddingBottom="8dp" 103 android:gravity="bottom"> 104 <Button android:id="@+id/button3" 105 style="?attr/buttonBarNeutralButtonStyle" 106 android:layout_width="wrap_content" 107 android:layout_height="wrap_content" /> 108 <Space 109 android:layout_width="0dp" 110 android:layout_height="0dp" 111 android:layout_weight="1" 112 android:visibility="invisible" /> 113 <Button android:id="@+id/button2" 114 style="?attr/buttonBarNegativeButtonStyle" 115 android:layout_width="wrap_content" 116 android:layout_height="wrap_content" /> 117 <Button android:id="@+id/button1" 118 style="?attr/buttonBarPositiveButtonStyle" 119 android:layout_width="wrap_content" 120 android:layout_height="wrap_content" /> 121 </LinearLayout> 122</LinearLayout> 123