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