1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  Copyright (C) 2017 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    xmlns:settings="http://schemas.android.com/apk/res-auto"
23    android:layout_width="match_parent"
24    android:layout_height="wrap_content"
25    android:minHeight="?android:attr/listPreferredItemHeightSmall"
26    android:gravity="center_vertical"
27    android:background="?android:attr/selectableItemBackground"
28    android:clipToPadding="false"
29    android:paddingStart="@dimen/lb_preference_item_padding_start"
30    android:paddingEnd="@dimen/lb_preference_item_padding_end">
31
32    <LinearLayout
33        android:layout_width="0dp"
34        android:layout_height="match_parent"
35        android:layout_weight="1"
36        android:background="?android:attr/selectableItemBackground"
37        android:gravity="start|center_vertical"
38        android:clipToPadding="false">
39
40        <FrameLayout
41                android:id="@+id/icon_frame"
42                android:layout_width="wrap_content"
43                android:layout_height="wrap_content"
44                android:layout_gravity="center_vertical" >
45            <ImageView
46                    android:id="@android:id/icon"
47                    android:layout_width="@dimen/lb_preference_item_icon_size"
48                    android:layout_height="@dimen/lb_preference_item_icon_size"
49                    android:layout_marginEnd="@dimen/lb_preference_item_icon_margin_end"
50            />
51        </FrameLayout>
52
53        <RelativeLayout
54            android:layout_width="wrap_content"
55            android:layout_height="wrap_content"
56            android:layout_weight="1"
57            android:paddingTop="16dp"
58            android:paddingBottom="16dp">
59
60            <TextView
61                android:id="@android:id/title"
62                android:layout_width="wrap_content"
63                android:layout_height="wrap_content"
64                android:singleLine="true"
65                android:layout_marginBottom="@dimen/lb_preference_item_primary_text_margin_bottom"
66                android:fontFamily="sans-serif"
67                android:textColor="@color/lb_preference_item_primary_text_color"
68                android:textSize="@dimen/lb_preference_item_primary_text_size"
69                android:ellipsize="marquee" />
70
71            <TextView
72                android:id="@android:id/summary"
73                android:layout_width="wrap_content"
74                android:layout_height="wrap_content"
75                android:layout_below="@android:id/title"
76                android:layout_alignStart="@android:id/title"
77                android:fontFamily="sans-serif-condensed"
78                android:textColor="@color/lb_preference_item_secondary_text_color"
79                android:textSize="@dimen/lb_preference_item_secondary_text_size"
80                android:maxLines="10" />
81
82        </RelativeLayout>
83
84    </LinearLayout>
85
86    <include layout="@layout/preference_two_target_divider" />
87
88    <!-- Preference should place its actual preference widget here. -->
89    <LinearLayout
90        android:id="@android:id/widget_frame"
91        android:layout_width="wrap_content"
92        android:layout_height="match_parent"
93        android:minWidth="64dp"
94        android:gravity="center"
95        android:orientation="vertical" />
96
97</LinearLayout>
98