• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3     Copyright (C) 2019 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
24    <LinearLayout
25        android:layout_width="match_parent"
26        android:layout_height="wrap_content"
27        android:orientation="vertical">
28
29        <LinearLayout
30            android:id="@+id/content"
31            android:layout_width="match_parent"
32            android:layout_height="wrap_content"
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"
37            android:orientation="horizontal"
38            android:gravity="center_vertical">
39
40            <ImageView
41                android:id="@android:id/icon"
42                android:layout_width="@dimen/contextual_card_icon_size"
43                android:layout_height="@dimen/contextual_card_icon_size"
44                android:tint="?android:attr/colorAccent"/>
45
46            <LinearLayout
47                android:layout_width="0dp"
48                android:layout_height="wrap_content"
49                android:layout_weight="1"
50                android:paddingStart="@dimen/contextual_condition_full_card_padding_start"
51                android:paddingEnd="@dimen/contextual_condition_full_card_padding_end"
52                android:orientation="vertical">
53
54                <TextView
55                    android:id="@android:id/title"
56                    android:layout_width="wrap_content"
57                    android:layout_height="wrap_content"
58                    android:layout_marginBottom="@dimen/contextual_condition_card_title_margin_bottom"
59                    android:textAppearance="@style/TextAppearance.ConditionCardTitle"/>
60
61                <TextView
62                    android:id="@android:id/summary"
63                    android:layout_width="wrap_content"
64                    android:layout_height="wrap_content"
65                    android:textAppearance="@style/TextAppearance.ConditionCardSummary"/>
66
67            </LinearLayout>
68
69        </LinearLayout>
70
71        <FrameLayout
72            android:layout_width="match_parent"
73            android:layout_height="wrap_content"
74            android:layout_marginStart="12dp"
75            android:layout_marginEnd="12dp">
76            <include
77                layout="@layout/horizontal_divider"/>
78        </FrameLayout>
79
80        <Button
81            android:id="@+id/first_action"
82            android:layout_width="match_parent"
83            android:layout_height="wrap_content"
84            style="@style/ConditionFullCardBorderlessButton"/>
85    </LinearLayout>
86
87</com.google.android.material.card.MaterialCardView>
88