1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  ~ Copyright (C) 2020 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_material_settings.xml except that the ripple effect is active only on
19     the left side. -->
20<LinearLayout
21    xmlns:android="http://schemas.android.com/apk/res/android"
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:clipToPadding="false"
28    android:paddingStart="@dimen/ap_preference_item_padding_start"
29    android:paddingEnd="@dimen/ap_preference_item_padding_end">
30
31    <LinearLayout
32        android:layout_width="0dp"
33        android:layout_height="match_parent"
34        android:layout_weight="1"
35        android:background="?android:attr/selectableItemBackground"
36        android:gravity="start|center_vertical"
37        android:clipToPadding="false">
38
39        <FrameLayout
40            android:id="@+id/icon_frame"
41            android:layout_width="wrap_content"
42            android:layout_height="wrap_content"
43            android:layout_gravity="center_vertical"
44            android:layout_marginEnd="@dimen/ap_preference_item_icon_margin_end">
45            <ImageView
46                android:id="@android:id/icon"
47                android:layout_width="@dimen/icon_size"
48                android:layout_height="@dimen/icon_size"
49            />
50        </FrameLayout>
51
52        <RelativeLayout
53            android:layout_width="wrap_content"
54            android:layout_height="wrap_content"
55            android:layout_weight="1"
56            android:paddingTop="16dp"
57            android:paddingBottom="16dp">
58
59            <TextView
60                android:id="@android:id/title"
61                android:layout_width="wrap_content"
62                android:layout_height="wrap_content"
63                android:singleLine="true"
64                android:textAppearance="?android:attr/textAppearanceLarge"
65                android:ellipsize="marquee" />
66
67            <TextView
68                android:id="@android:id/summary"
69                android:layout_width="wrap_content"
70                android:layout_height="wrap_content"
71                android:layout_below="@android:id/title"
72                android:layout_alignStart="@android:id/title"
73                android:textAppearance="?android:attr/textAppearanceMedium"
74                android:maxLines="10" />
75
76        </RelativeLayout>
77
78    </LinearLayout>
79
80    <include layout="@layout/preference_two_target_divider" />
81
82    <!-- Preference should place its actual preference widget here. -->
83    <LinearLayout
84        android:id="@android:id/widget_frame"
85        android:layout_width="wrap_content"
86        android:layout_height="match_parent"
87        android:minWidth="64dp"
88        android:gravity="center"
89        android:orientation="vertical" />
90
91</LinearLayout>
92