• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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<LinearLayout
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:color/transparent"
23    android:gravity="center_vertical"
24    android:minHeight="?android:attr/listPreferredItemHeightSmall">
25    <LinearLayout
26        android:layout_width="0dp"
27        android:layout_height="match_parent"
28        android:layout_weight="1"
29        android:background="?android:attr/selectableItemBackground"
30        android:clipToPadding="false"
31        android:gravity="start|center_vertical"
32        android:paddingBottom="@*android:dimen/car_preference_row_vertical_margin"
33        android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
34        android:paddingStart="?android:attr/listPreferredItemPaddingStart"
35        android:paddingTop="@*android:dimen/car_preference_row_vertical_margin">
36        <androidx.preference.internal.PreferenceImageView
37            android:id="@android:id/icon"
38            android:layout_width="@*android:dimen/car_preference_icon_size"
39            android:layout_height="@*android:dimen/car_preference_icon_size"
40            android:layout_marginEnd="?android:attr/listPreferredItemPaddingEnd"/>
41        <LinearLayout
42            android:layout_width="match_parent"
43            android:layout_height="wrap_content"
44            android:layout_centerVertical="true"
45            android:orientation="vertical">
46            <TextView
47                android:id="@android:id/title"
48                android:layout_width="wrap_content"
49                android:layout_height="wrap_content"
50                android:ellipsize="end"
51                android:hyphenationFrequency="none"
52                android:singleLine="true"
53                android:textAppearance="?android:attr/textAppearanceListItem"/>
54            <TextView
55                android:id="@android:id/summary"
56                android:layout_width="wrap_content"
57                android:layout_height="wrap_content"
58                android:hyphenationFrequency="none"
59                android:textAppearance="?android:attr/textAppearanceListItemSecondary"/>
60        </LinearLayout>
61    </LinearLayout>
62    <LinearLayout
63        android:id="@+id/action_widget_container"
64        android:layout_width="wrap_content"
65        android:layout_height="match_parent">
66        <View
67            android:id="@+id/two_target_divider"
68            android:layout_width="1dp"
69            android:layout_height="match_parent"
70            android:layout_marginBottom="@*android:dimen/car_preference_row_vertical_margin"
71            android:layout_marginTop="@*android:dimen/car_preference_row_vertical_margin"
72            android:background="?attr/carDividerColor"/>
73        <!-- Preference should place its actual preference widget here. -->
74        <FrameLayout
75            android:id="@android:id/widget_frame"
76            android:layout_width="wrap_content"
77            android:layout_height="match_parent"
78            android:background="?android:attr/selectableItemBackground"
79            android:gravity="center"
80            android:minWidth="?android:attr/listPreferredItemHeightSmall"
81            android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
82            android:paddingStart="?android:attr/listPreferredItemPaddingStart"/>
83    </LinearLayout>
84</LinearLayout>
85