1<?xml version="1.0" encoding="utf-8"?>
2<!--
3    Copyright 2019 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<RelativeLayout
19    xmlns:android="http://schemas.android.com/apk/res/android"
20    android:layout_width="match_parent"
21    android:layout_height="wrap_content"
22    android:background="?android:attr/selectableItemBackground"
23    android:clipToPadding="false"
24    android:minHeight="?android:attr/listPreferredItemHeightSmall"
25    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
26    android:tag="carUiPreference"
27    android:paddingStart="?android:attr/listPreferredItemPaddingStart">
28
29    <ImageView
30        android:id="@android:id/icon"
31        android:layout_width="@dimen/car_ui_preference_icon_size"
32        android:layout_height="@dimen/car_ui_preference_icon_size"
33        android:layout_alignParentStart="true"
34        android:layout_centerVertical="true"
35        android:layout_marginBottom="@dimen/car_ui_preference_content_margin_bottom"
36        android:layout_marginEnd="@dimen/car_ui_preference_icon_margin_end"
37        android:layout_marginTop="@dimen/car_ui_preference_content_margin_top"
38        android:scaleType="fitCenter"
39        style="@style/Preference.CarUi.Icon"/>
40
41    <LinearLayout
42        android:layout_width="match_parent"
43        android:layout_height="wrap_content"
44        android:layout_centerVertical="true"
45        android:layout_marginBottom="@dimen/car_ui_preference_content_margin_bottom"
46        android:layout_marginTop="@dimen/car_ui_preference_content_margin_top"
47        android:layout_toEndOf="@android:id/icon"
48        android:layout_toStartOf="@android:id/widget_frame"
49        android:orientation="vertical">
50
51        <TextView
52            android:id="@android:id/title"
53            android:layout_width="wrap_content"
54            android:layout_height="wrap_content"
55            android:singleLine="true"
56            android:textAppearance="@style/TextAppearance.CarUi.PreferenceTitle"/>
57
58        <TextView
59            android:id="@android:id/summary"
60            android:layout_width="wrap_content"
61            android:layout_height="wrap_content"
62            android:textAppearance="@style/TextAppearance.CarUi.PreferenceSummary"/>
63
64    </LinearLayout>
65
66    <!-- Preference should place its actual preference widget here. -->
67    <FrameLayout
68        android:id="@android:id/widget_frame"
69        android:layout_width="wrap_content"
70        android:layout_height="wrap_content"
71        android:layout_alignParentEnd="true"
72        android:layout_centerVertical="true"/>
73
74</RelativeLayout>
75