1<?xml version="1.0" encoding="utf-8"?> 2<!-- Copyright (C) 2017 The Android Open Source Project 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15--> 16 17<android.support.v7.widget.CardView 18 xmlns:android="http://schemas.android.com/apk/res/android" 19 xmlns:app="http://schemas.android.com/apk/res-auto" 20 android:id="@+id/suggestion_card" 21 android:layout_width="match_parent" 22 android:layout_height="wrap_content" 23 android:layout_marginStart="16dp" 24 android:layout_marginEnd="16dp" 25 app:cardPreventCornerOverlap="false" 26 app:cardUseCompatPadding="true" 27 app:cardElevation="2dp" 28 app:cardCornerRadius="@dimen/suggestion_card_corner_radius"> 29 30 <LinearLayout 31 android:layout_width="match_parent" 32 android:layout_height="wrap_content" 33 android:minHeight="112dp" 34 android:paddingBottom="8dp" 35 android:orientation="vertical"> 36 37 <RelativeLayout 38 android:layout_width="match_parent" 39 android:layout_height="wrap_content" 40 android:orientation="horizontal"> 41 42 <ImageView 43 android:id="@android:id/icon" 44 android:layout_width="@dimen/suggestion_card_icon_size" 45 android:layout_height="@dimen/suggestion_card_icon_size" 46 style="@style/SuggestionCardIcon" 47 android:layout_marginTop="16dp" 48 android:layout_marginBottom="6dp" /> 49 50 51 <FrameLayout 52 android:id="@+id/close_button" 53 android:layout_width="48dp" 54 android:layout_height="48dp" 55 android:layout_alignParentEnd="true" 56 android:paddingTop="8dp" 57 android:paddingEnd="8dp" 58 android:orientation="horizontal" 59 android:contentDescription="@string/dlg_close"> 60 <ImageView 61 android:layout_width="18dp" 62 android:layout_height="18dp" 63 android:layout_gravity="end|top" 64 android:alpha="0.54" 65 android:src="@drawable/ic_suggestion_close_button"/> 66 </FrameLayout> 67 68 </RelativeLayout> 69 70 <TextView 71 android:id="@android:id/title" 72 android:layout_width="match_parent" 73 android:layout_height="wrap_content" 74 style="@style/SuggestionCardText" 75 android:layout_marginStart="12dp" 76 android:layout_marginEnd="12dp" 77 android:singleLine="true" 78 android:textAppearance="@style/TextAppearance.SuggestionTitle" 79 android:fadingEdge="horizontal" /> 80 81 <TextView 82 android:id="@android:id/summary" 83 android:layout_width="match_parent" 84 android:layout_height="wrap_content" 85 style="@style/SuggestionCardText" 86 android:layout_marginStart="12dp" 87 android:layout_marginEnd="12dp" 88 android:singleLine="true" 89 android:textAppearance="@style/TextAppearance.SuggestionSummary" /> 90 91 </LinearLayout> 92 93</android.support.v7.widget.CardView> 94