• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2019 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<!-- This file is copied from preference_app.xml with modification to
17     support widget on the opposite side horizontally -->
18<LinearLayout
19    xmlns:android="http://schemas.android.com/apk/res/android"
20    xmlns:settings="http://schemas.android.com/apk/res-auto"
21    android:layout_width="match_parent"
22    android:layout_height="wrap_content"
23    android:background="?android:attr/selectableItemBackground"
24    android:gravity="center_vertical"
25    android:minHeight="?android:attr/listPreferredItemHeightSmall"
26    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
27
28    <LinearLayout
29        android:id="@android:id/widget_frame"
30        android:layout_width="wrap_content"
31        android:layout_height="match_parent"
32        android:gravity="center"
33        android:minWidth="56dp"
34        android:layout_marginEnd="16dp"
35        android:orientation="vertical" />
36
37    <LinearLayout
38        android:id="@+id/icon_frame"
39        android:layout_width="wrap_content"
40        android:layout_height="wrap_content"
41        android:gravity="center_vertical"
42        android:minWidth="32dp"
43        android:orientation="horizontal"
44        android:layout_marginEnd="16dp"
45        android:paddingTop="4dp"
46        android:paddingBottom="4dp">
47        <androidx.preference.internal.PreferenceImageView
48            android:id="@android:id/icon"
49            android:layout_width="wrap_content"
50            android:layout_height="wrap_content"
51            settings:maxWidth="@dimen/secondary_app_icon_size"
52            settings:maxHeight="@dimen/secondary_app_icon_size" />
53    </LinearLayout>
54
55    <LinearLayout
56        android:layout_width="0dp"
57        android:layout_height="wrap_content"
58        android:layout_weight="1"
59        android:orientation="vertical"
60        android:paddingTop="16dp"
61        android:paddingBottom="16dp">
62
63        <TextView android:id="@android:id/title"
64                  android:layout_width="wrap_content"
65                  android:layout_height="wrap_content"
66                  android:singleLine="true"
67                  android:textAppearance="@style/TextAppearance.TileTitle"
68                  android:ellipsize="marquee"
69                  android:fadingEdge="horizontal" />
70
71        <LinearLayout
72            android:id="@+id/summary_container"
73            android:layout_width="match_parent"
74            android:layout_height="wrap_content"
75            android:visibility="gone">
76            <TextView android:id="@android:id/summary"
77                      android:layout_width="0dp"
78                      android:layout_height="wrap_content"
79                      android:layout_weight="1"
80                      android:textAppearance="@style/TextAppearance.Small"
81                      android:textAlignment="viewStart"
82                      android:textColor="?android:attr/textColorSecondary" />
83
84            <TextView android:id="@+id/appendix"
85                      android:layout_width="0dp"
86                      android:layout_height="wrap_content"
87                      android:layout_weight="1"
88                      android:textAppearance="@style/TextAppearance.Small"
89                      android:textAlignment="viewEnd"
90                      android:textColor="?android:attr/textColorSecondary"
91                      android:maxLines="1"
92                      android:ellipsize="end" />
93        </LinearLayout>
94        <ProgressBar
95            android:id="@android:id/progress"
96            style="?android:attr/progressBarStyleHorizontal"
97            android:layout_width="match_parent"
98            android:layout_height="wrap_content"
99            android:layout_marginTop="4dp"
100            android:max="100"
101            android:visibility="gone" />
102    </LinearLayout>
103
104</LinearLayout>
105