1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 Copyright (C) 2015 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<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" 19 android:layout_width="match_parent" 20 android:layout_height="wrap_content" 21 android:clipChildren="false" 22 android:clipToPadding="false"> 23 <LinearLayout 24 android:id="@+id/content" 25 android:layout_width="match_parent" 26 android:layout_height="wrap_content" 27 android:orientation="vertical" 28 android:paddingStart="16dp" 29 android:background="?android:attr/colorAccent" 30 android:elevation="2dp" 31 android:clickable="true" 32 android:focusable="true"> 33 34 <LinearLayout 35 android:id="@+id/collapsed_group" 36 android:layout_width="match_parent" 37 android:layout_height="56dp" 38 android:orientation="horizontal" 39 android:gravity="center"> 40 41 <ImageView 42 android:id="@android:id/icon" 43 android:layout_width="24dp" 44 android:layout_height="wrap_content" 45 android:layout_marginEnd="32dp" 46 android:tint="?android:attr/textColorPrimaryInverse" /> 47 48 <TextView 49 android:id="@android:id/title" 50 android:layout_width="0dp" 51 android:layout_height="wrap_content" 52 android:layout_weight="1" 53 android:textAppearance="?android:attr/textAppearanceMedium" 54 android:textColor="?android:attr/textColorPrimaryInverse" /> 55 56 <ImageView 57 android:id="@+id/expand_indicator" 58 android:layout_width="wrap_content" 59 android:layout_height="match_parent" 60 android:padding="16dp" 61 android:tint="?android:attr/textColorPrimaryInverse" 62 android:clickable="true" 63 android:focusable="true" 64 android:background="?android:attr/selectableItemBackground" /> 65 66 </LinearLayout> 67 68 <LinearLayout 69 android:id="@+id/detail_group" 70 android:layout_width="match_parent" 71 android:layout_height="0dp" 72 android:paddingStart="56dp" 73 android:visibility="gone" 74 android:orientation="vertical"> 75 76 <!-- TODO: Don't set alpha here, and do proper themeing that 77 handles night mode --> 78 <TextView 79 android:id="@android:id/summary" 80 android:layout_width="match_parent" 81 android:layout_height="wrap_content" 82 android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" 83 android:paddingBottom="16dp" 84 android:textAppearance="?android:attr/textAppearanceListItemSecondary" 85 android:alpha=".7" 86 android:textColor="?android:attr/textColorPrimaryInverse" /> 87 88 <!-- TODO: Better background --> 89 <View 90 android:id="@+id/divider" 91 android:layout_width="match_parent" 92 android:layout_height=".25dp" 93 android:background="@android:color/white" /> 94 95 <com.android.internal.widget.ButtonBarLayout 96 android:id="@+id/buttonBar" 97 android:layout_width="match_parent" 98 android:layout_height="wrap_content" 99 android:paddingTop="8dp" 100 android:paddingBottom="8dp" 101 style="?attr/buttonBarStyle" 102 android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"> 103 104 <Button 105 android:id="@+id/first_action" 106 android:layout_width="wrap_content" 107 android:layout_height="wrap_content" 108 android:paddingStart="0dp" 109 android:alpha=".8" 110 android:textColor="?android:attr/textColorPrimaryInverse" 111 style="?android:attr/buttonBarButtonStyle" /> 112 113 <Button 114 android:id="@+id/second_action" 115 android:layout_width="wrap_content" 116 android:layout_height="wrap_content" 117 android:alpha=".8" 118 android:textColor="?android:attr/textColorPrimaryInverse" 119 style="?android:attr/buttonBarButtonStyle" /> 120 121 </com.android.internal.widget.ButtonBarLayout> 122 123 </LinearLayout> 124 125 </LinearLayout> 126</FrameLayout> 127