• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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<!-- Same as androidx/preference/preference/res/layout/expand_button.xml except title font -->
19<LinearLayout
20    xmlns:android="http://schemas.android.com/apk/res/android"
21    android:layout_width="match_parent"
22    android:layout_height="wrap_content"
23    android:textDirection="locale"
24    android:minHeight="?android:attr/listPreferredItemHeightSmall"
25    android:gravity="center_vertical"
26    android:paddingLeft="?android:attr/listPreferredItemPaddingLeft"
27    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
28    android:paddingRight="?android:attr/listPreferredItemPaddingRight"
29    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
30    android:background="?android:attr/selectableItemBackground"
31    android:clipToPadding="false"
32    android:baselineAligned="false">
33
34    <ImageView
35        android:id="@android:id/icon"
36        android:layout_width="wrap_content"
37        android:layout_height="wrap_content"
38        android:gravity="center"
39        android:maxWidth="24dp"
40        android:maxHeight="24dp"
41        android:paddingEnd="24dp" />
42
43    <RelativeLayout
44        android:layout_width="0dp"
45        android:layout_height="wrap_content"
46        android:layout_weight="1"
47        android:paddingTop="16dp"
48        android:paddingBottom="16dp">
49
50        <TextView
51            android:id="@android:id/title"
52            android:layout_width="wrap_content"
53            android:layout_height="wrap_content"
54            android:singleLine="true"
55            android:textAppearance="?android:attr/textAppearanceListItem"
56            android:textColor="?android:attr/textColorPrimary"
57            android:ellipsize="marquee"/>
58
59        <TextView
60            android:id="@android:id/summary"
61            android:layout_width="wrap_content"
62            android:layout_height="wrap_content"
63            android:layout_below="@android:id/title"
64            android:layout_alignLeft="@android:id/title"
65            android:layout_alignStart="@android:id/title"
66            android:textColor="?android:attr/textColorSecondary"
67            android:ellipsize="marquee"
68            android:singleLine="true"
69            style="@style/PreferenceSummaryTextStyle"/>
70
71    </RelativeLayout>
72</LinearLayout>