Fan Zhang | 2a98c84 | 2018-11-05 15:40:32 -0800 | [diff] [blame] | 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 | |
Fan Zhang | a60652a | 2018-11-27 14:29:45 -0800 | [diff] [blame] | 18 | <com.google.android.material.card.MaterialCardView |
Fan Zhang | 2a98c84 | 2018-11-05 15:40:32 -0800 | [diff] [blame] | 19 | xmlns:android="http://schemas.android.com/apk/res/android" |
| 20 | android:id="@+id/suggestion_card" |
| 21 | android:layout_width="match_parent" |
| 22 | android:layout_height="wrap_content" |
| 23 | style="@style/ContextualCardStyle"> |
| 24 | |
| 25 | <LinearLayout |
| 26 | android:layout_width="match_parent" |
| 27 | android:layout_height="wrap_content" |
| 28 | android:minHeight="112dp" |
| 29 | android:paddingBottom="8dp" |
| 30 | android:orientation="vertical"> |
| 31 | |
| 32 | <RelativeLayout |
| 33 | android:layout_width="match_parent" |
| 34 | android:layout_height="wrap_content" |
| 35 | android:orientation="horizontal"> |
| 36 | |
| 37 | <ImageView |
| 38 | android:id="@android:id/icon" |
Fan Zhang | b64d16d | 2019-04-10 12:25:10 -0700 | [diff] [blame] | 39 | android:layout_width="@dimen/contextual_card_icon_size" |
| 40 | android:layout_height="@dimen/contextual_card_icon_size" |
Fan Zhang | 2a98c84 | 2018-11-05 15:40:32 -0800 | [diff] [blame] | 41 | style="@style/SuggestionCardIcon" |
| 42 | android:layout_marginTop="16dp" |
| 43 | android:layout_marginBottom="6dp"/> |
| 44 | |
Yi-Ling Chuang | 83ac0ef | 2019-09-19 13:39:53 -0700 | [diff] [blame] | 45 | <FrameLayout |
| 46 | android:id="@+id/close_button" |
| 47 | android:layout_width="48dp" |
| 48 | android:layout_height="48dp" |
| 49 | android:layout_alignParentEnd="true" |
| 50 | android:paddingTop="8dp" |
| 51 | android:paddingEnd="8dp" |
| 52 | android:orientation="horizontal" |
| 53 | android:contentDescription="@string/suggestion_button_close"> |
| 54 | <ImageView |
| 55 | android:layout_width="18dp" |
| 56 | android:layout_height="18dp" |
| 57 | android:layout_gravity="end|top" |
| 58 | android:alpha="0.54" |
| 59 | android:src="@drawable/ic_suggestion_close_button"/> |
| 60 | </FrameLayout> |
| 61 | |
Fan Zhang | 2a98c84 | 2018-11-05 15:40:32 -0800 | [diff] [blame] | 62 | </RelativeLayout> |
| 63 | |
| 64 | <TextView |
| 65 | android:id="@android:id/title" |
| 66 | android:layout_width="match_parent" |
| 67 | android:layout_height="wrap_content" |
| 68 | style="@style/SuggestionCardText" |
| 69 | android:layout_marginStart="12dp" |
| 70 | android:layout_marginEnd="12dp" |
| 71 | android:singleLine="true" |
| 72 | android:textAppearance="@style/TextAppearance.SuggestionTitle" |
| 73 | android:fadingEdge="horizontal"/> |
| 74 | |
| 75 | <TextView |
| 76 | android:id="@android:id/summary" |
| 77 | android:layout_width="match_parent" |
| 78 | android:layout_height="wrap_content" |
| 79 | style="@style/SuggestionCardText" |
| 80 | android:layout_marginStart="12dp" |
| 81 | android:layout_marginEnd="12dp" |
| 82 | android:singleLine="true" |
| 83 | android:textAppearance="@style/TextAppearance.SuggestionSummary"/> |
| 84 | |
| 85 | </LinearLayout> |
| 86 | |
Fan Zhang | a60652a | 2018-11-27 14:29:45 -0800 | [diff] [blame] | 87 | </com.google.android.material.card.MaterialCardView> |