1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  Copyright (C) 2022 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<!-- Based off preference_two_target.xml with Material ripple moved to parent for full ripple. -->
19<LinearLayout
20    xmlns:android="http://schemas.android.com/apk/res/android"
21    xmlns:settings="http://schemas.android.com/apk/res-auto"
22    android:layout_width="match_parent"
23    android:layout_height="wrap_content"
24    android:minHeight="?android:attr/listPreferredItemHeightSmall"
25    android:gravity="center_vertical"
26    android:background="?android:attr/selectableItemBackground"
27    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
28    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
29    android:clipToPadding="false">
30
31    <LinearLayout
32        android:layout_width="0dp"
33        android:layout_height="match_parent"
34        android:layout_weight="1"
35        android:gravity="start|center_vertical"
36        android:clipToPadding="false">
37
38        <LinearLayout
39            android:id="@+id/icon_frame"
40            android:layout_width="wrap_content"
41            android:layout_height="wrap_content"
42            android:gravity="start|center_vertical"
43            android:minWidth="48dp"
44            android:orientation="horizontal"
45            android:clipToPadding="false"
46            android:paddingTop="4dp"
47            android:paddingBottom="4dp">
48            <androidx.preference.internal.PreferenceImageView
49                android:id="@android:id/icon"
50                android:layout_width="wrap_content"
51                android:layout_height="wrap_content"
52                settings:maxWidth="48dp"
53                settings:maxHeight="48dp" />
54        </LinearLayout>
55
56        <RelativeLayout
57            android:layout_width="wrap_content"
58            android:layout_height="wrap_content"
59            android:layout_weight="1"
60            android:paddingTop="16dp"
61            android:paddingBottom="16dp">
62
63            <TextView
64                android:id="@android:id/title"
65                android:layout_width="wrap_content"
66                android:layout_height="wrap_content"
67                android:maxLines="2"
68                android:hyphenationFrequency="normalFast"
69                android:lineBreakWordStyle="phrase"
70                android:textAppearance="?android:attr/textAppearanceListItem"
71                android:ellipsize="marquee" />
72
73            <TextView
74                android:id="@android:id/summary"
75                android:layout_width="wrap_content"
76                android:layout_height="wrap_content"
77                android:layout_below="@android:id/title"
78                android:layout_alignStart="@android:id/title"
79                android:textAppearance="?android:attr/textAppearanceListItemSecondary"
80                android:textColor="?android:attr/textColorSecondary"
81                android:hyphenationFrequency="normalFast"
82                android:lineBreakWordStyle="phrase"
83                android:maxLines="10" />
84
85        </RelativeLayout>
86
87    </LinearLayout>
88
89    <include layout="@layout/preference_two_target_divider" />
90
91    <!-- Preference should place its actual preference widget here. -->
92    <LinearLayout
93        android:id="@android:id/widget_frame"
94        android:layout_width="wrap_content"
95        android:layout_height="match_parent"
96        android:minWidth="@dimen/two_target_min_width"
97        android:gravity="center"
98        android:orientation="vertical" />
99
100    <ImageButton
101        android:id="@+id/icon_button"
102        android:layout_width="wrap_content"
103        android:layout_height="match_parent"
104        android:minWidth="@dimen/two_target_min_width"
105        android:minHeight="@dimen/min_tap_target_size"
106        android:layout_gravity="center"
107        android:background="?android:attr/selectableItemBackground"
108        android:visibility="gone">
109    </ImageButton>
110</LinearLayout>
111