1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  Copyright (C) 2018 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:clipToPadding="false"
27    android:layout_marginBottom="@dimen/tp_preference_item_margin_bottom"
28    android:paddingTop="@dimen/lb_preference_item_text_space_top"
29    android:paddingBottom="@dimen/lb_preference_item_text_space_bottom"
30    android:paddingStart="@dimen/lb_preference_item_padding_start"
31    android:paddingEnd="@dimen/tp_access_point_padding_end">
32
33    <LinearLayout
34        android:layout_width="0dp"
35        android:layout_height="match_parent"
36        android:layout_weight="1"
37        android:duplicateParentState="true"
38        android:background="?android:attr/selectableItemBackground"
39        android:gravity="start|center_vertical"
40        android:clipToPadding="false">
41
42        <FrameLayout
43                android:id="@+id/icon_frame"
44                android:layout_width="wrap_content"
45                android:layout_height="wrap_content"
46                android:layout_gravity="center_vertical"
47                android:duplicateParentState="true">
48            <ImageView
49                    android:id="@android:id/icon"
50                    android:layout_width="@dimen/lb_preference_item_icon_size"
51                    android:layout_height="@dimen/lb_preference_item_icon_size"
52                    android:layout_marginEnd="@dimen/lb_preference_item_icon_margin_end"
53                    style="?android:attr/imageButtonStyle"
54            />
55        </FrameLayout>
56
57        <RelativeLayout
58            android:layout_width="wrap_content"
59            android:layout_height="wrap_content"
60            android:layout_weight="1"
61            android:duplicateParentState="true">
62
63            <TextView
64                android:id="@android:id/title"
65                android:layout_width="wrap_content"
66                android:layout_height="wrap_content"
67                android:minHeight="@dimen/tp_preference_title_min_height"
68                android:includeFontPadding="true"
69                android:singleLine="true"
70                android:layout_marginBottom="@dimen/lb_preference_item_primary_text_margin_bottom"
71                android:duplicateParentState="true"
72                android:textAppearance="?android:attr/textAppearanceListItem"
73                android:ellipsize="marquee" />
74
75            <TextView
76                android:id="@android:id/summary"
77                android:layout_width="wrap_content"
78                android:layout_height="wrap_content"
79                android:layout_below="@android:id/title"
80                android:layout_alignStart="@android:id/title"
81                android:minHeight="@dimen/tp_preference_summary_min_height"
82                android:includeFontPadding="true"
83                android:duplicateParentState="true"
84                android:textAppearance="?android:attr/textAppearanceListItemSecondary"
85                android:maxLines="10" />
86
87        </RelativeLayout>
88
89    </LinearLayout>
90
91    <include layout="@layout/preference_two_target_divider" />
92
93    <!-- Preference should place its actual preference widget here. -->
94    <LinearLayout
95        android:id="@android:id/widget_frame"
96        android:layout_width="wrap_content"
97        android:layout_height="match_parent"
98        android:duplicateParentState="true"
99        android:minWidth="64dp"
100        android:gravity="center_vertical"
101        android:orientation="vertical" />
102
103</LinearLayout>
104