blob: 4c0da17a6a909fdbf50246a63daa9dcf61b16d1a [file] [log] [blame]
Mill Chen0ca71302018-11-05 17:20:22 +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
Fan Zhanga60652a2018-11-27 14:29:45 -080018<com.google.android.material.card.MaterialCardView
Mill Chen0ca71302018-11-05 17:20:22 +080019 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 Chen0ca71302018-11-05 17:20:22 +080025 android:layout_width="match_parent"
Mill Chenc89c4ce2018-11-08 18:55:01 +080026 android:layout_height="wrap_content"
Mill Chend9737762018-12-25 18:02:18 +080027 android:orientation="vertical">
Mill Chen0ca71302018-11-05 17:20:22 +080028
29 <LinearLayout
Fan Zhang07207c02019-02-12 12:29:49 -080030 android:id="@+id/content"
Mill Chend9737762018-12-25 18:02:18 +080031 android:layout_width="match_parent"
Mill Chen0ca71302018-11-05 17:20:22 +080032 android:layout_height="wrap_content"
Fan Zhangb64d16d2019-04-10 12:25:10 -070033 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 Zhang07207c02019-02-12 12:29:49 -080037 android:orientation="horizontal"
Stanley Wang109dc512019-05-02 16:03:44 +080038 android:gravity="center_vertical"
39 android:background="?android:attr/selectableItemBackground">
Mill Chen0ca71302018-11-05 17:20:22 +080040
Mill Chend9737762018-12-25 18:02:18 +080041 <ImageView
42 android:id="@android:id/icon"
Fan Zhangb64d16d2019-04-10 12:25:10 -070043 android:layout_width="@dimen/contextual_card_icon_size"
44 android:layout_height="@dimen/contextual_card_icon_size"
Mill Chend9737762018-12-25 18:02:18 +080045 android:tint="?android:attr/colorAccent"/>
46
Fan Zhang07207c02019-02-12 12:29:49 -080047 <LinearLayout
48 android:layout_width="0dp"
Mill Chen0ca71302018-11-05 17:20:22 +080049 android:layout_height="wrap_content"
Fan Zhang07207c02019-02-12 12:29:49 -080050 android:layout_weight="1"
Fan Zhangb64d16d2019-04-10 12:25:10 -070051 android:paddingStart="@dimen/contextual_condition_full_card_padding_start"
52 android:paddingEnd="@dimen/contextual_condition_full_card_padding_end"
Fan Zhang07207c02019-02-12 12:29:49 -080053 android:orientation="vertical">
Mill Chen0ca71302018-11-05 17:20:22 +080054
Fan Zhang07207c02019-02-12 12:29:49 -080055 <TextView
56 android:id="@android:id/title"
57 android:layout_width="wrap_content"
58 android:layout_height="wrap_content"
Fan Zhangb64d16d2019-04-10 12:25:10 -070059 android:layout_marginBottom="@dimen/contextual_condition_card_title_margin_bottom"
Jason Chiu4b6a1a52020-02-11 16:36:35 +080060 android:textAppearance="@style/TextAppearance.HomepageCardTitle"/>
Mill Chend9737762018-12-25 18:02:18 +080061
Fan Zhang07207c02019-02-12 12:29:49 -080062 <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 Chen0ca71302018-11-05 17:20:22 +080069
70 </LinearLayout>
Fan Zhang07207c02019-02-12 12:29:49 -080071
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 Chen0ca71302018-11-05 17:20:22 +080081 <Button
82 android:id="@+id/first_action"
Mill Chend9737762018-12-25 18:02:18 +080083 android:layout_width="match_parent"
Mill Chen0ca71302018-11-05 17:20:22 +080084 android:layout_height="wrap_content"
Fan Zhang07207c02019-02-12 12:29:49 -080085 style="@style/ConditionFullCardBorderlessButton"/>
Mill Chen0ca71302018-11-05 17:20:22 +080086 </LinearLayout>
87
Fan Zhanga60652a2018-11-27 14:29:45 -080088</com.google.android.material.card.MaterialCardView>