• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2020 The Android Open Source Project
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7
8          http://www.apache.org/licenses/LICENSE-2.0
9
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15-->
16<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
17              android:layout_width="match_parent"
18              android:layout_height="wrap_content"
19              android:orientation="vertical"
20              android:minHeight="?android:attr/listPreferredItemHeightSmall"
21              android:gravity="center_vertical"
22              android:paddingStart="?android:attr/listPreferredItemPaddingStart"
23              android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
24              android:paddingTop="16dp"
25              android:paddingBottom="16dp"
26              android:background="?android:attr/selectableItemBackground"
27              android:focusable="true"
28              android:clipToPadding="false">
29
30    <LinearLayout
31        android:layout_width="match_parent"
32        android:layout_height="wrap_content"
33        android:gravity="center_vertical"
34        android:orientation="horizontal">
35
36        <!-- We are not showing here, but need to keep it here, because SwitchPreference expects it. -->
37        <LinearLayout
38            android:id="@android:id/icon_frame"
39            android:layout_width="wrap_content"
40            android:layout_height="wrap_content"
41            android:visibility="gone">
42            <ImageView
43                android:id="@android:id/icon"
44                android:layout_width="@dimen/permission_icon_size"
45                android:layout_height="@dimen/permission_icon_size"/>
46        </LinearLayout>
47
48        <TextView
49            android:id="@android:id/title"
50            android:layout_width="0dp"
51            android:layout_height="wrap_content"
52            android:layout_weight="1"
53            android:textAppearance="?android:attr/textAppearanceListItem"/>
54
55        <!-- Preference should place its actual preference widget here. -->
56        <LinearLayout
57            android:id="@android:id/widget_frame"
58            android:layout_width="wrap_content"
59            android:layout_height="match_parent"
60            android:gravity="end|center_vertical"
61            android:paddingStart="16dp"
62            android:orientation="vertical"/>
63
64    </LinearLayout>
65
66    <TextView
67        android:id="@android:id/summary"
68        android:layout_width="match_parent"
69        android:layout_height="wrap_content"
70        android:layout_below="@android:id/title"
71        android:layout_alignStart="@android:id/title"
72        android:textAppearance="?android:attr/textAppearanceListItemSecondary"
73        android:textColor="?android:attr/textColorSecondary"
74        android:maxLines="10"/>
75
76</LinearLayout>
77