Home | History | Annotate | Download | only in layout
      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:background="?android:attr/colorAccent"
     29         android:elevation="2dp"
     30         android:clickable="true"
     31         android:focusable="true">
     32 
     33         <LinearLayout
     34             android:id="@+id/collapsed_group"
     35             android:layout_width="match_parent"
     36             android:layout_height="56dp"
     37             android:background="?android:attr/selectableItemBackground"
     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_marginStart="16dp"
     46                 android:layout_marginEnd="32dp"
     47                 android:tint="?android:attr/textColorPrimaryInverse" />
     48 
     49             <TextView
     50                 android:id="@android:id/title"
     51                 android:layout_width="0dp"
     52                 android:layout_height="wrap_content"
     53                 android:layout_weight="1"
     54                 android:textAppearance="?android:attr/textAppearanceMedium"
     55                 android:textColor="?android:attr/textColorPrimaryInverse" />
     56 
     57             <ImageView
     58                 android:id="@+id/expand_indicator"
     59                 android:layout_width="wrap_content"
     60                 android:layout_height="match_parent"
     61                 android:padding="16dp"
     62                 android:tint="?android:attr/textColorPrimaryInverse"/>
     63 
     64         </LinearLayout>
     65 
     66         <LinearLayout
     67             android:id="@+id/detail_group"
     68             android:layout_width="match_parent"
     69             android:layout_height="wrap_content"
     70             android:paddingStart="72dp"
     71             android:visibility="gone"
     72             android:orientation="vertical">
     73 
     74             <!-- TODO: Don't set alpha here, and do proper themeing that
     75                  handles night mode -->
     76             <TextView
     77                 android:id="@android:id/summary"
     78                 android:layout_width="match_parent"
     79                 android:layout_height="wrap_content"
     80                 android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
     81                 android:paddingBottom="16dp"
     82                 android:textAppearance="?android:attr/textAppearanceListItemSecondary"
     83                 android:alpha=".7"
     84                 android:textColor="?android:attr/textColorPrimaryInverse" />
     85 
     86             <!-- TODO: Better background -->
     87             <View
     88                 android:id="@+id/divider"
     89                 android:layout_width="match_parent"
     90                 android:layout_height=".25dp"
     91                 android:background="@android:color/white" />
     92 
     93             <com.android.internal.widget.ButtonBarLayout
     94                 android:id="@+id/buttonBar"
     95                 android:layout_width="match_parent"
     96                 android:layout_height="wrap_content"
     97                 android:paddingTop="8dp"
     98                 android:paddingBottom="8dp"
     99                 style="?android:attr/buttonBarStyle"
    100                 android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
    101 
    102                 <Button
    103                     android:id="@+id/first_action"
    104                     android:layout_width="0dp"
    105                     android:layout_height="wrap_content"
    106                     android:layout_weight="1"
    107                     android:paddingStart="0dp"
    108                     android:alpha=".8"
    109                     android:textAlignment="viewStart"
    110                     android:textColor="?android:attr/textColorPrimaryInverse"
    111                     style="?android:attr/buttonBarButtonStyle" />
    112 
    113                 <Button
    114                     android:id="@+id/second_action"
    115                     android:layout_width="0dp"
    116                     android:layout_height="wrap_content"
    117                     android:layout_weight="1"
    118                     android:alpha=".8"
    119                     android:textAlignment="viewStart"
    120                     android:textColor="?android:attr/textColorPrimaryInverse"
    121                     style="?android:attr/buttonBarButtonStyle" />
    122 
    123             </com.android.internal.widget.ButtonBarLayout>
    124 
    125         </LinearLayout>
    126 
    127     </LinearLayout>
    128 </FrameLayout>
    129