1<?xml version="1.0" encoding="utf-8"?> 2<!-- Copyright (C) 2018 The Android Open Source Project 3 4Licensed under the Apache License, Version 2.0 (the "License"); 5you may not use this file except in compliance with the License. 6You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10Unless required by applicable law or agreed to in writing, software 11distributed under the License is distributed on an "AS IS" BASIS, 12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13See the License for the specific language governing permissions and 14limitations under the License. 15--> 16 17<!-- Note: the width is 0dp because ColumnCardView will automatically set a width based 18 on the number of columns it should take up. See ColumnCardView for more details. --> 19<androidx.car.widget.ColumnCardView 20 xmlns:android="http://schemas.android.com/apk/res/android" 21 xmlns:app="http://schemas.android.com/apk/res-auto" 22 android:layout_gravity="center" 23 android:layout_width="0dp" 24 android:layout_height="wrap_content" 25 android:elevation="@dimen/car_dialog_elevation" 26 app:cardBackgroundColor="?attr/dialogBackgroundColor" 27 app:cardCornerRadius="@dimen/car_radius_3"> 28 29 <LinearLayout 30 android:id="@+id/content_view" 31 android:layout_width="wrap_content" 32 android:layout_height="wrap_content" 33 android:layout_marginStart="@dimen/car_keyline_1" 34 android:layout_marginEnd="@dimen/car_keyline_1" 35 android:paddingTop="@dimen/car_padding_4" 36 android:paddingBottom="@dimen/car_padding_4" 37 android:orientation="vertical"> 38 39 <TextView 40 android:id="@+id/title" 41 android:layout_width="wrap_content" 42 android:layout_height="@dimen/car_dialog_header_height" 43 android:gravity="center_vertical|start" 44 android:visibility="gone" 45 style="?attr/dialogTitleStyle" /> 46 47 <TextView 48 android:id="@+id/body" 49 android:layout_width="wrap_content" 50 android:layout_height="wrap_content" 51 android:visibility="gone" 52 style="?attr/dialogBodyStyle" /> 53 54 <LinearLayout 55 android:id="@+id/button_panel" 56 android:layout_width="match_parent" 57 android:layout_height="@dimen/car_dialog_action_bar_height" 58 android:layout_marginTop="@dimen/car_padding_2" 59 android:gravity="center_vertical" 60 android:orientation="horizontal" 61 android:visibility="gone"> 62 63 <Button 64 android:id="@+id/positive_button" 65 android:layout_marginEnd="@dimen/car_padding_4" 66 android:layout_width="wrap_content" 67 android:minWidth="0dp" 68 android:padding="0dp" 69 android:textColor="@color/car_accent" 70 android:visibility="gone" 71 style="?attr/dialogButtonStyle" /> 72 73 <Button 74 android:id="@+id/negative_button" 75 android:layout_width="wrap_content" 76 android:minWidth="0dp" 77 android:padding="0dp" 78 android:textColor="@color/car_accent" 79 android:visibility="gone" 80 style="?attr/dialogButtonStyle" /> 81 </LinearLayout> 82 </LinearLayout> 83</androidx.car.widget.ColumnCardView> 84