1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2023 The Android Open Source Project
3     Licensed under the Apache License, Version 2.0 (the "License");
4     you may not use this file except in compliance with the License.
5     You may obtain a copy of the License at
6          http://www.apache.org/licenses/LICENSE-2.0
7     Unless required by applicable law or agreed to in writing, software
8     distributed under the License is distributed on an "AS IS" BASIS,
9     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10     See the License for the specific language governing permissions and
11     limitations under the License.
12-->
13
14<LinearLayout
15    xmlns:android="http://schemas.android.com/apk/res/android"
16    xmlns:app="http://schemas.android.com/apk/res-auto"
17    android:layout_width="match_parent"
18    android:layout_height="wrap_content"
19    android:minHeight="?android:attr/listPreferredItemHeight"
20    android:gravity="center_vertical"
21    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
22    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
23    android:background="?android:attr/selectableItemBackground">
24
25    <FrameLayout
26        android:id="@+id/icon_frame"
27        android:layout_width="wrap_content"
28        android:layout_height="wrap_content">
29        <androidx.preference.internal.PreferenceImageView
30            android:id="@android:id/icon"
31            android:layout_width="wrap_content"
32            android:layout_height="wrap_content"
33            app:maxWidth="48dp"
34            app:maxHeight="48dp" />
35    </FrameLayout>
36
37    <RelativeLayout
38        android:layout_width="0dp"
39        android:layout_height="wrap_content"
40        android:paddingTop="16dp"
41        android:paddingBottom="16dp"
42        android:layout_weight="1">
43
44        <TextView android:id="@+id/title"
45                  android:layout_width="wrap_content"
46                  android:layout_height="wrap_content"
47                  android:singleLine="true"
48                  android:textAppearance="?android:attr/textAppearanceLarge"
49                  android:textColor="?android:attr/textColorPrimary"
50                  android:fadingEdge="horizontal" />
51
52        <TextView android:id="@+id/summary"
53                  android:layout_width="wrap_content"
54                  android:layout_height="wrap_content"
55                  android:layout_below="@+id/title"
56                  android:layout_alignStart="@+id/title"
57                  android:layout_alignLeft="@+id/title"
58                  android:textAppearance="?android:attr/textAppearanceSmall"
59                  android:textColor="?android:attr/textColorSecondary"
60                  android:maxLines="4" />
61
62        <LinearLayout
63            android:layout_width="wrap_content"
64            android:layout_height="wrap_content"
65            android:paddingStart="15dp"
66            android:layout_toEndOf="@+id/title"
67            android:gravity="center_vertical"
68            android:orientation="horizontal">
69
70            <TextView
71                android:id="@+id/modifier_key_left_bracket"
72                android:layout_width="wrap_content"
73                android:layout_height="wrap_content"
74                android:textDirection="locale"
75                android:paddingStart="1dp"
76                android:paddingEnd="1dp"
77                android:textAppearance="?android:attr/textAppearanceLarge"
78                android:textColor="?android:attr/textColorPrimary"
79                android:fadingEdge="horizontal" />
80
81            <ImageView
82                android:id="@+id/modifier_key_action_key_icon"
83                android:layout_width="wrap_content"
84                android:layout_height="wrap_content"
85                android:fadingEdge="horizontal"
86                android:tint="?android:attr/textColorPrimary"/>
87
88            <TextView
89                android:id="@+id/modifier_key_right_bracket"
90                android:layout_width="wrap_content"
91                android:layout_height="wrap_content"
92                android:textDirection="locale"
93                android:paddingStart="1dp"
94                android:paddingEnd="1dp"
95                android:textAppearance="?android:attr/textAppearanceLarge"
96                android:textColor="?android:attr/textColorPrimary"
97                android:fadingEdge="horizontal" />
98        </LinearLayout>
99    </RelativeLayout>
100
101    <!-- Preference should place its actual preference widget here. -->
102    <LinearLayout android:id="@android:id/widget_frame"
103                  android:layout_width="wrap_content"
104                  android:layout_height="match_parent"
105                  android:gravity="center_vertical"
106                  android:orientation="vertical" />
107</LinearLayout>
108