Mill Chen | 0ca7130 | 2018-11-05 17:20:22 +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 |
Mill Chen | 0ca7130 | 2018-11-05 17:20:22 +0800 | [diff] [blame] | 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 |
Mill Chen | 0ca7130 | 2018-11-05 17:20:22 +0800 | [diff] [blame] | 25 | android:layout_width="match_parent" |
Mill Chen | c89c4ce | 2018-11-08 18:55:01 +0800 | [diff] [blame] | 26 | android:layout_height="wrap_content" |
Mill Chen | d973776 | 2018-12-25 18:02:18 +0800 | [diff] [blame] | 27 | android:orientation="vertical"> |
Mill Chen | 0ca7130 | 2018-11-05 17:20:22 +0800 | [diff] [blame] | 28 | |
| 29 | <LinearLayout |
Fan Zhang | 07207c0 | 2019-02-12 12:29:49 -0800 | [diff] [blame] | 30 | android:id="@+id/content" |
Mill Chen | d973776 | 2018-12-25 18:02:18 +0800 | [diff] [blame] | 31 | android:layout_width="match_parent" |
Mill Chen | 0ca7130 | 2018-11-05 17:20:22 +0800 | [diff] [blame] | 32 | android:layout_height="wrap_content" |
Fan Zhang | b64d16d | 2019-04-10 12:25:10 -0700 | [diff] [blame] | 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" |
Fan Zhang | 07207c0 | 2019-02-12 12:29:49 -0800 | [diff] [blame] | 37 | android:orientation="horizontal" |
Stanley Wang | 109dc51 | 2019-05-02 16:03:44 +0800 | [diff] [blame] | 38 | android:gravity="center_vertical" |
| 39 | android:background="?android:attr/selectableItemBackground"> |
Mill Chen | 0ca7130 | 2018-11-05 17:20:22 +0800 | [diff] [blame] | 40 | |
Mill Chen | d973776 | 2018-12-25 18:02:18 +0800 | [diff] [blame] | 41 | <ImageView |
| 42 | android:id="@android:id/icon" |
Fan Zhang | b64d16d | 2019-04-10 12:25:10 -0700 | [diff] [blame] | 43 | android:layout_width="@dimen/contextual_card_icon_size" |
| 44 | android:layout_height="@dimen/contextual_card_icon_size" |
Mill Chen | d973776 | 2018-12-25 18:02:18 +0800 | [diff] [blame] | 45 | android:tint="?android:attr/colorAccent"/> |
| 46 | |
Fan Zhang | 07207c0 | 2019-02-12 12:29:49 -0800 | [diff] [blame] | 47 | <LinearLayout |
| 48 | android:layout_width="0dp" |
Mill Chen | 0ca7130 | 2018-11-05 17:20:22 +0800 | [diff] [blame] | 49 | android:layout_height="wrap_content" |
Fan Zhang | 07207c0 | 2019-02-12 12:29:49 -0800 | [diff] [blame] | 50 | android:layout_weight="1" |
Fan Zhang | b64d16d | 2019-04-10 12:25:10 -0700 | [diff] [blame] | 51 | android:paddingStart="@dimen/contextual_condition_full_card_padding_start" |
| 52 | android:paddingEnd="@dimen/contextual_condition_full_card_padding_end" |
Fan Zhang | 07207c0 | 2019-02-12 12:29:49 -0800 | [diff] [blame] | 53 | android:orientation="vertical"> |
Mill Chen | 0ca7130 | 2018-11-05 17:20:22 +0800 | [diff] [blame] | 54 | |
Fan Zhang | 07207c0 | 2019-02-12 12:29:49 -0800 | [diff] [blame] | 55 | <TextView |
| 56 | android:id="@android:id/title" |
| 57 | android:layout_width="wrap_content" |
| 58 | android:layout_height="wrap_content" |
Fan Zhang | b64d16d | 2019-04-10 12:25:10 -0700 | [diff] [blame] | 59 | android:layout_marginBottom="@dimen/contextual_condition_card_title_margin_bottom" |
Jason Chiu | 4b6a1a5 | 2020-02-11 16:36:35 +0800 | [diff] [blame] | 60 | android:textAppearance="@style/TextAppearance.HomepageCardTitle"/> |
Mill Chen | d973776 | 2018-12-25 18:02:18 +0800 | [diff] [blame] | 61 | |
Fan Zhang | 07207c0 | 2019-02-12 12:29:49 -0800 | [diff] [blame] | 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> |
Mill Chen | 0ca7130 | 2018-11-05 17:20:22 +0800 | [diff] [blame] | 69 | |
| 70 | </LinearLayout> |
Fan Zhang | 07207c0 | 2019-02-12 12:29:49 -0800 | [diff] [blame] | 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 | |
Mill Chen | 0ca7130 | 2018-11-05 17:20:22 +0800 | [diff] [blame] | 81 | <Button |
| 82 | android:id="@+id/first_action" |
Mill Chen | d973776 | 2018-12-25 18:02:18 +0800 | [diff] [blame] | 83 | android:layout_width="match_parent" |
Mill Chen | 0ca7130 | 2018-11-05 17:20:22 +0800 | [diff] [blame] | 84 | android:layout_height="wrap_content" |
Fan Zhang | 07207c0 | 2019-02-12 12:29:49 -0800 | [diff] [blame] | 85 | style="@style/ConditionFullCardBorderlessButton"/> |
Mill Chen | 0ca7130 | 2018-11-05 17:20:22 +0800 | [diff] [blame] | 86 | </LinearLayout> |
| 87 | |
Fan Zhang | a60652a | 2018-11-27 14:29:45 -0800 | [diff] [blame] | 88 | </com.google.android.material.card.MaterialCardView> |