• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2
3<!--
4  Copyright (C) 2024 The Android Open Source Project
5
6  Licensed under the Apache License, Version 2.0 (the "License");
7  you may not use this file except in compliance with the License.
8  You may obtain a copy of the License at
9
10       http://www.apache.org/licenses/LICENSE-2.0
11
12  Unless required by applicable law or agreed to in writing, software
13  distributed under the License is distributed on an "AS IS" BASIS,
14  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  See the License for the specific language governing permissions and
16  limitations under the License.
17  -->
18
19<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
20    xmlns:app="http://schemas.android.com/apk/res-auto"
21    android:layout_height="wrap_content"
22    android:layout_width="match_parent"
23    android:minHeight="?android:attr/listPreferredItemHeight"
24    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
25    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
26    android:paddingVertical="@dimen/settingslib_switchbar_margin"
27    android:background="@android:color/transparent">
28
29    <LinearLayout
30        android:id="@+id/background"
31        android:layout_height="wrap_content"
32        android:layout_width="match_parent"
33        android:paddingStart="@dimen/settingslib_switchbar_padding_left"
34        android:paddingEnd="@dimen/settingslib_switchbar_padding_right"
35        android:orientation="horizontal"
36        android:gravity="start|center_vertical"
37        android:baselineAligned="false">
38
39        <FrameLayout
40            android:id="@+id/icon_frame"
41            android:layout_width="wrap_content"
42            android:layout_height="wrap_content"
43            android:layout_marginEnd="15dip"
44            android:layout_marginRight="15dip">
45            <androidx.preference.internal.PreferenceImageView
46                android:id="@android:id/icon"
47                android:layout_width="wrap_content"
48                android:layout_height="wrap_content"
49                app:maxWidth="48dp"
50                app:maxHeight="48dp" />
51        </FrameLayout>
52
53        <RelativeLayout
54            android:layout_width="0dp"
55            android:layout_height="wrap_content"
56            android:layout_marginEnd="6dip"
57            android:layout_marginRight="6dip"
58            android:layout_marginTop="@dimen/settingslib_switch_title_margin"
59            android:layout_marginBottom="@dimen/settingslib_switch_title_margin"
60            android:layout_weight="1">
61
62            <TextView android:id="@android:id/title"
63                android:layout_width="wrap_content"
64                android:layout_height="wrap_content"
65                android:singleLine="true"
66                android:textAppearance="?android:attr/textAppearanceListItem"
67                android:textColor="?android:attr/textColorPrimary"
68                android:ellipsize="marquee"
69                android:fadingEdge="horizontal"
70                android:hyphenationFrequency="normalFast"
71                android:lineBreakWordStyle="phrase" />
72
73            <TextView android:id="@android:id/summary"
74                android:layout_width="wrap_content"
75                android:layout_height="wrap_content"
76                android:layout_below="@android:id/title"
77                android:layout_alignStart="@android:id/title"
78                android:layout_alignLeft="@android:id/title"
79                android:textAppearance="?android:attr/textAppearanceSmall"
80                android:textColor="?android:attr/textColorSecondary"
81                android:hyphenationFrequency="normalFast"
82                android:lineBreakWordStyle="phrase"
83                android:maxLines="4"
84                android:scrollbars="none"/>
85        </RelativeLayout>
86
87        <!-- Preference should place its actual preference widget here. -->
88        <LinearLayout android:id="@android:id/widget_frame"
89            android:layout_width="wrap_content"
90            android:layout_height="match_parent"
91            android:gravity="center_vertical"
92            android:orientation="vertical" />
93    </LinearLayout>
94
95</FrameLayout>