blob: d2011ad2e64908a49583bc8a9eed7ae7a6fd6c35 [file] [log] [blame]
Mill Chen3f3823e2018-12-10 21:33:58 +08001<?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 Chuangdc2b2c72019-03-29 22:44:27 +080024 <FrameLayout
Mill Chen3f3823e2018-12-10 21:33:58 +080025 android:layout_width="match_parent"
Yi-Ling Chuang26127c62019-01-09 11:54:16 +080026 android:layout_height="match_parent">
Mill Chen3f3823e2018-12-10 21:33:58 +080027
Yi-Ling Chuangdc2b2c72019-03-29 22:44:27 +080028 <include layout="@layout/dismissal_swipe_background"/>
29
Yi-Ling Chuang734d8262019-04-01 22:53:10 +080030 <LinearLayout
31 android:id="@+id/content"
Mill Chen3f3823e2018-12-10 21:33:58 +080032 android:layout_width="match_parent"
Yi-Ling Chuang734d8262019-04-01 22:53:10 +080033 android:layout_height="match_parent"
Fan Zhangb64d16d2019-04-10 12:25:10 -070034 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 Wang109dc512019-05-02 16:03:44 +080037 android:background="@drawable/contextual_card_background"
Yi-Ling Chuang734d8262019-04-01 22:53:10 +080038 android:orientation="vertical">
Mill Chen3f3823e2018-12-10 21:33:58 +080039
Yi-Ling Chuang734d8262019-04-01 22:53:10 +080040 <ImageView
41 android:id="@android:id/icon"
Fan Zhangb64d16d2019-04-10 12:25:10 -070042 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 Chuang734d8262019-04-01 22:53:10 +080045
46 <TextView
47 android:id="@android:id/title"
Mill Chen3f3823e2018-12-10 21:33:58 +080048 android:layout_width="match_parent"
Yi-Ling Chuang734d8262019-04-01 22:53:10 +080049 android:layout_height="wrap_content"
50 android:maxLines="2"
51 android:minLines="1"
52 android:ellipsize="end"
Fan Zhangb64d16d2019-04-10 12:25:10 -070053 android:layout_marginStart="@dimen/contextual_card_text_padding_start"
54 android:layout_marginTop="@dimen/contextual_half_card_title_margin_top"
Jason Chiu4b6a1a52020-02-11 16:36:35 +080055 android:textAppearance="@style/TextAppearance.HomepageCardTitle"/>
Mill Chen3f3823e2018-12-10 21:33:58 +080056
Yi-Ling Chuang734d8262019-04-01 22:53:10 +080057 </LinearLayout>
Mill Chen3f3823e2018-12-10 21:33:58 +080058
Yi-Ling Chuang734d8262019-04-01 22:53:10 +080059 <!--dismissal view-->
Fan Zhang4cb25ed2019-04-09 16:33:58 -070060 <include layout="@layout/contextual_card_dismissal_view"/>
Mill Chen3f3823e2018-12-10 21:33:58 +080061
Yi-Ling Chuangdc2b2c72019-03-29 22:44:27 +080062 </FrameLayout>
Stanley Wang109dc512019-05-02 16:03:44 +080063</com.google.android.material.card.MaterialCardView>