blob: c3470c0717388d3c7ca3b0d0ce1228f9c87ba275 [file] [log] [blame]
Mehdi Alizadehffea2ae2019-05-15 11:01:25 -07001<?xml version="1.0" encoding="utf-8"?>
2<!--
3 ~ Copyright (C) 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<!-- This file is copied from preference_radio.xml with modification to
18 support an extra clickable icon on the opposite side horizontally -->
19<LinearLayout
20 xmlns:android="http://schemas.android.com/apk/res/android"
21 xmlns:settings="http://schemas.android.com/apk/res-auto"
22 android:layout_width="match_parent"
23 android:layout_height="wrap_content"
24 android:background="?android:attr/selectableItemBackground"
25 android:gravity="center_vertical"
26 android:minHeight="?android:attr/listPreferredItemHeightSmall"
27 android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
28
29 <LinearLayout
30 android:id="@android:id/widget_frame"
31 android:layout_width="wrap_content"
32 android:layout_height="match_parent"
33 android:gravity="center"
34 android:minWidth="56dp"
35 android:layout_marginEnd="16dp"
36 android:orientation="vertical" />
37
38 <LinearLayout
39 android:id="@+id/icon_frame"
40 android:layout_width="wrap_content"
41 android:layout_height="wrap_content"
42 android:gravity="center_vertical"
43 android:minWidth="32dp"
44 android:orientation="horizontal"
45 android:layout_marginEnd="16dp"
46 android:paddingTop="4dp"
47 android:paddingBottom="4dp">
48 <androidx.preference.internal.PreferenceImageView
49 android:id="@android:id/icon"
50 android:layout_width="wrap_content"
51 android:layout_height="wrap_content"
52 settings:maxWidth="@dimen/secondary_app_icon_size"
53 settings:maxHeight="@dimen/secondary_app_icon_size" />
54 </LinearLayout>
55
56 <LinearLayout
57 android:layout_width="0dp"
58 android:layout_height="wrap_content"
59 android:layout_weight="1"
60 android:orientation="vertical"
61 android:paddingTop="16dp"
62 android:paddingBottom="16dp">
63
64 <TextView android:id="@android:id/title"
65 android:layout_width="wrap_content"
66 android:layout_height="wrap_content"
67 android:singleLine="true"
Sunny Shao44ae2a82019-09-09 20:00:12 +080068 android:textAppearance="?android:attr/textAppearanceListItem"
Mehdi Alizadehffea2ae2019-05-15 11:01:25 -070069 android:ellipsize="marquee"
70 android:fadingEdge="horizontal" />
71
72 <TextView android:id="@android:id/summary"
73 android:layout_width="match_parent"
74 android:layout_height="wrap_content"
75 android:layout_weight="1"
Sunny Shao44ae2a82019-09-09 20:00:12 +080076 android:textAppearance="?android:attr/textAppearanceSmall"
Mehdi Alizadehffea2ae2019-05-15 11:01:25 -070077 android:textAlignment="viewStart"
78 android:textColor="?android:attr/textColorSecondary" />
79 </LinearLayout>
80 <LinearLayout
81 android:id="@+id/radio_extra_widget_container"
82 android:layout_width="wrap_content"
83 android:layout_height="match_parent"
84 android:orientation="horizontal"
85 android:gravity="center_vertical">
86 <View
87 android:id="@+id/radio_extra_widget_divider"
88 android:layout_width="@dimen/vertical_divider_width"
89 android:layout_height="match_parent"
90 android:layout_marginTop="36dp"
91 android:layout_marginBottom="36dp"
92 android:layout_marginStart="8dp"
93 android:background="?android:attr/dividerVertical" />
94 <ImageView
95 android:id="@+id/radio_extra_widget"
96 android:layout_width="wrap_content"
97 android:layout_height="fill_parent"
98 android:paddingStart="16dp"
99 android:paddingEnd="16dp"
100 android:src="@drawable/ic_settings_about"
101 android:contentDescription="@string/information_label"
102 android:layout_gravity="center"
103 android:background="?android:attr/selectableItemBackground" />
104 </LinearLayout>
105
106</LinearLayout>