Mill Chen | 3f3823e | 2018-12-10 21:33:58 +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 | |
| 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 | |
Yi-Ling Chuang | dc2b2c7 | 2019-03-29 22:44:27 +0800 | [diff] [blame] | 24 | <FrameLayout |
Mill Chen | 3f3823e | 2018-12-10 21:33:58 +0800 | [diff] [blame] | 25 | android:layout_width="match_parent" |
Yi-Ling Chuang | 26127c6 | 2019-01-09 11:54:16 +0800 | [diff] [blame] | 26 | android:layout_height="match_parent"> |
Mill Chen | 3f3823e | 2018-12-10 21:33:58 +0800 | [diff] [blame] | 27 | |
Yi-Ling Chuang | dc2b2c7 | 2019-03-29 22:44:27 +0800 | [diff] [blame] | 28 | <include layout="@layout/dismissal_swipe_background"/> |
| 29 | |
Yi-Ling Chuang | 734d826 | 2019-04-01 22:53:10 +0800 | [diff] [blame] | 30 | <LinearLayout |
| 31 | android:id="@+id/content" |
Mill Chen | 3f3823e | 2018-12-10 21:33:58 +0800 | [diff] [blame] | 32 | android:layout_width="match_parent" |
Yi-Ling Chuang | 734d826 | 2019-04-01 22:53:10 +0800 | [diff] [blame] | 33 | android:layout_height="match_parent" |
Fan Zhang | b64d16d | 2019-04-10 12:25:10 -0700 | [diff] [blame] | 34 | android:paddingEnd="@dimen/contextual_card_padding_end" |
| 35 | android:paddingTop="@dimen/contextual_half_card_padding_top" |
| 36 | android:paddingBottom="@dimen/contextual_half_card_padding_bottom" |
Stanley Wang | 109dc51 | 2019-05-02 16:03:44 +0800 | [diff] [blame] | 37 | android:background="@drawable/contextual_card_background" |
Yi-Ling Chuang | 734d826 | 2019-04-01 22:53:10 +0800 | [diff] [blame] | 38 | android:orientation="vertical"> |
Mill Chen | 3f3823e | 2018-12-10 21:33:58 +0800 | [diff] [blame] | 39 | |
Yi-Ling Chuang | 734d826 | 2019-04-01 22:53:10 +0800 | [diff] [blame] | 40 | <ImageView |
| 41 | android:id="@android:id/icon" |
Fan Zhang | b64d16d | 2019-04-10 12:25:10 -0700 | [diff] [blame] | 42 | android:layout_width="@dimen/contextual_card_icon_size" |
| 43 | android:layout_height="@dimen/contextual_card_icon_size" |
| 44 | android:layout_marginStart="@dimen/contextual_card_icon_padding_start"/> |
Yi-Ling Chuang | 734d826 | 2019-04-01 22:53:10 +0800 | [diff] [blame] | 45 | |
| 46 | <TextView |
| 47 | android:id="@android:id/title" |
Mill Chen | 3f3823e | 2018-12-10 21:33:58 +0800 | [diff] [blame] | 48 | android:layout_width="match_parent" |
Yi-Ling Chuang | 734d826 | 2019-04-01 22:53:10 +0800 | [diff] [blame] | 49 | android:layout_height="wrap_content" |
| 50 | android:maxLines="2" |
| 51 | android:minLines="1" |
| 52 | android:ellipsize="end" |
Fan Zhang | b64d16d | 2019-04-10 12:25:10 -0700 | [diff] [blame] | 53 | android:layout_marginStart="@dimen/contextual_card_text_padding_start" |
| 54 | android:layout_marginTop="@dimen/contextual_half_card_title_margin_top" |
Jason Chiu | 4b6a1a5 | 2020-02-11 16:36:35 +0800 | [diff] [blame] | 55 | android:textAppearance="@style/TextAppearance.HomepageCardTitle"/> |
Mill Chen | 3f3823e | 2018-12-10 21:33:58 +0800 | [diff] [blame] | 56 | |
Yi-Ling Chuang | 734d826 | 2019-04-01 22:53:10 +0800 | [diff] [blame] | 57 | </LinearLayout> |
Mill Chen | 3f3823e | 2018-12-10 21:33:58 +0800 | [diff] [blame] | 58 | |
Yi-Ling Chuang | 734d826 | 2019-04-01 22:53:10 +0800 | [diff] [blame] | 59 | <!--dismissal view--> |
Fan Zhang | 4cb25ed | 2019-04-09 16:33:58 -0700 | [diff] [blame] | 60 | <include layout="@layout/contextual_card_dismissal_view"/> |
Mill Chen | 3f3823e | 2018-12-10 21:33:58 +0800 | [diff] [blame] | 61 | |
Yi-Ling Chuang | dc2b2c7 | 2019-03-29 22:44:27 +0800 | [diff] [blame] | 62 | </FrameLayout> |
Stanley Wang | 109dc51 | 2019-05-02 16:03:44 +0800 | [diff] [blame] | 63 | </com.google.android.material.card.MaterialCardView> |