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:id="@+id/content" 26 android:layout_width="match_parent" 27 android:layout_height="wrap_content" 28 android:orientation="vertical"> 29 30 <LinearLayout 31 android:layout_width="match_parent" 32 android:layout_height="wrap_content" 33 android:paddingTop="@dimen/contextual_condition_half_card_padding_top" 34 android:paddingEnd="@dimen/contextual_card_padding_end" 35 android:orientation="vertical" 36 android:background="?android:attr/selectableItemBackground"> 37 38 <ImageView 39 android:id="@android:id/icon" 40 android:layout_width="@dimen/contextual_card_icon_size" 41 android:layout_height="@dimen/contextual_card_icon_size" 42 android:layout_marginStart="@dimen/contextual_card_icon_padding_start" 43 android:tint="?android:attr/colorAccent"/> 44 45 <TextView 46 android:id="@android:id/title" 47 android:layout_width="match_parent" 48 android:layout_height="wrap_content" 49 android:maxLines="1" 50 android:ellipsize="end" 51 android:layout_marginStart="@dimen/contextual_card_text_padding_start" 52 android:layout_marginTop="@dimen/contextual_condition_half_card_title_margin_top" 53 android:layout_marginBottom="@dimen/contextual_condition_card_title_margin_bottom" 54 android:textAppearance="@style/TextAppearance.ConditionCardTitle"/> 55 56 <TextView 57 android:id="@android:id/summary" 58 android:layout_width="match_parent" 59 android:layout_height="wrap_content" 60 android:lines="1" 61 android:ellipsize="end" 62 android:layout_marginStart="@dimen/contextual_card_text_padding_start" 63 android:layout_marginBottom="@dimen/contextual_condition_half_card_summary_margin_bottom" 64 android:textAppearance="@style/TextAppearance.ConditionCardSummary"/> 65 66 </LinearLayout> 67 68 <FrameLayout 69 android:layout_width="match_parent" 70 android:layout_height="wrap_content" 71 android:layout_marginStart="12dp" 72 android:layout_marginEnd="12dp"> 73 <include 74 layout="@layout/horizontal_divider"/> 75 </FrameLayout> 76 77 <Button 78 android:id="@+id/first_action" 79 android:layout_width="match_parent" 80 android:layout_height="wrap_content" 81 android:scrollbars="none" 82 style="@style/ConditionHalfCardBorderlessButton"/> 83 84 </LinearLayout> 85 86</com.google.android.material.card.MaterialCardView> 87