1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 Copyright (C) 2018 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<com.google.android.material.card.MaterialCardView 19 xmlns:android="http://schemas.android.com/apk/res/android" 20 android:layout_width="match_parent" 21 android:layout_height="wrap_content" 22 style="@style/ContextualCardStyle"> 23 24 <LinearLayout 25 android:layout_width="match_parent" 26 android:layout_height="wrap_content" 27 android:orientation="vertical"> 28 29 <LinearLayout 30 android:id="@+id/content" 31 android:layout_width="match_parent" 32 android:layout_height="wrap_content" 33 android:paddingStart="@dimen/contextual_card_icon_padding_start" 34 android:paddingEnd="@dimen/contextual_full_card_padding_end" 35 android:paddingTop="@dimen/contextual_condition_full_card_padding_top" 36 android:paddingBottom="@dimen/contextual_condition_full_card_padding_bottom" 37 android:orientation="horizontal" 38 android:gravity="center_vertical" 39 android:background="?android:attr/selectableItemBackground"> 40 41 <ImageView 42 android:id="@android:id/icon" 43 android:layout_width="@dimen/contextual_card_icon_size" 44 android:layout_height="@dimen/contextual_card_icon_size" 45 android:tint="?android:attr/colorAccent"/> 46 47 <LinearLayout 48 android:layout_width="0dp" 49 android:layout_height="wrap_content" 50 android:layout_weight="1" 51 android:paddingStart="@dimen/contextual_condition_full_card_padding_start" 52 android:paddingEnd="@dimen/contextual_condition_full_card_padding_end" 53 android:orientation="vertical"> 54 55 <TextView 56 android:id="@android:id/title" 57 android:layout_width="wrap_content" 58 android:layout_height="wrap_content" 59 android:layout_marginBottom="@dimen/contextual_condition_card_title_margin_bottom" 60 android:textAppearance="@style/TextAppearance.ConditionCardTitle"/> 61 62 <TextView 63 android:id="@android:id/summary" 64 android:layout_width="wrap_content" 65 android:layout_height="wrap_content" 66 android:textAppearance="@style/TextAppearance.ConditionCardSummary"/> 67 68 </LinearLayout> 69 70 </LinearLayout> 71 72 <FrameLayout 73 android:layout_width="match_parent" 74 android:layout_height="wrap_content" 75 android:layout_marginStart="12dp" 76 android:layout_marginEnd="12dp"> 77 <include 78 layout="@layout/horizontal_divider"/> 79 </FrameLayout> 80 81 <Button 82 android:id="@+id/first_action" 83 android:layout_width="match_parent" 84 android:layout_height="wrap_content" 85 style="@style/ConditionFullCardBorderlessButton"/> 86 </LinearLayout> 87 88</com.google.android.material.card.MaterialCardView> 89