OSDN Git Service

Merge "Zen Condition text and primary click changes"
[android-x86/packages-apps-Settings.git] / res / layout / suggestion_tile_with_button.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- Copyright (C) 2017 The Android Open Source Project
3
4      Licensed under the Apache License, Version 2.0 (the "License");
5      you may not use this file except in compliance with the License.
6      You may obtain a copy of the License at
7
8           http://www.apache.org/licenses/LICENSE-2.0
9
10      Unless required by applicable law or agreed to in writing, software
11      distributed under the License is distributed on an "AS IS" BASIS,
12      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13      See the License for the specific language governing permissions and
14      limitations under the License.
15 -->
16
17 <android.support.v7.widget.CardView
18     xmlns:android="http://schemas.android.com/apk/res/android"
19     xmlns:app="http://schemas.android.com/apk/res-auto"
20     android:id="@+id/suggestion_card"
21     android:layout_width="wrap_content"
22     android:layout_height="wrap_content"
23     app:cardPreventCornerOverlap="false"
24     app:cardUseCompatPadding="true"
25     app:cardElevation="2dp"
26     app:cardCornerRadius="@dimen/suggestion_card_corner_radius">
27
28     <LinearLayout
29         android:layout_width="match_parent"
30         android:layout_height="wrap_content"
31         android:minHeight="112dp"
32         android:orientation="vertical">
33
34         <RelativeLayout
35             android:layout_width="match_parent"
36             android:layout_height="wrap_content"
37             android:orientation="horizontal">
38
39             <ImageView
40                 android:id="@android:id/icon"
41                 android:layout_width="@dimen/suggestion_card_icon_size"
42                 android:layout_height="@dimen/suggestion_card_icon_size"
43                 style="@style/SuggestionCardIcon"
44                 android:layout_marginTop="16dp"
45                 android:layout_marginBottom="8dp" />
46
47             <ImageView
48                 android:id="@+id/close_button"
49                 android:layout_width="18dp"
50                 android:layout_height="18dp"
51                 android:alpha="0.54"
52                 android:layout_alignParentEnd="true"
53                 android:layout_marginTop="8dp"
54                 android:layout_marginEnd="8dp"
55                 android:src="@drawable/ic_suggestion_close_button"/>
56
57         </RelativeLayout>
58
59         <TextView
60             android:id="@android:id/title"
61             android:layout_width="match_parent"
62             android:layout_height="wrap_content"
63             style="@style/SuggestionCardText"
64             android:layout_marginStart="12dp"
65             android:layout_marginEnd="12dp"
66             android:singleLine="true"
67             android:textAppearance="@style/TextAppearance.SuggestionTitleV2"
68             android:ellipsize="end"
69             android:fadingEdge="horizontal" />
70
71         <TextView
72             android:id="@android:id/summary"
73             android:layout_width="match_parent"
74             android:layout_height="wrap_content"
75             style="@style/SuggestionCardText"
76             android:layout_marginStart="12dp"
77             android:layout_marginEnd="12dp"
78             android:textAppearance="@style/TextAppearance.SuggestionSummary" />
79
80         <Button
81             android:id="@android:id/primary"
82             style="@style/ActionPrimaryButton"
83             android:layout_gravity="center"
84             android:layout_width="wrap_content"
85             android:layout_height="wrap_content"
86             android:layout_marginTop="12dp"
87             android:text="@string/suggestion_button_text" />
88
89     </LinearLayout>
90
91 </android.support.v7.widget.CardView>