1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- Copyright (C) 2015 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 17 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 18 android:layout_width="match_parent" 19 android:layout_height="wrap_content" 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:background="?android:attr/activatedBackgroundIndicator" 25 android:clipToPadding="false"> 26 27 <LinearLayout 28 android:id="@+id/icon_frame" 29 android:layout_width="wrap_content" 30 android:layout_height="wrap_content" 31 android:layout_marginStart="-4dp" 32 android:minWidth="60dp" 33 android:gravity="start|center_vertical" 34 android:orientation="horizontal" 35 android:paddingEnd="12dp" 36 android:paddingTop="4dp" 37 android:paddingBottom="4dp"> 38 <com.android.internal.widget.PreferenceImageView 39 android:id="@android:id/icon" 40 android:layout_width="wrap_content" 41 android:layout_height="wrap_content" 42 android:maxWidth="48dp" 43 android:maxHeight="48dp" /> 44 </LinearLayout> 45 46 <RelativeLayout 47 android:layout_width="wrap_content" 48 android:layout_height="wrap_content" 49 android:layout_weight="1" 50 android:paddingTop="16dp" 51 android:paddingBottom="16dp"> 52 53 <TextView android:id="@android:id/title" 54 android:layout_width="wrap_content" 55 android:layout_height="wrap_content" 56 android:singleLine="true" 57 android:textAppearance="?android:attr/textAppearanceListItem" 58 android:ellipsize="marquee" /> 59 60 <TextView 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_alignStart="@android:id/title" 65 android:textAppearance="?android:attr/textAppearanceListItemSecondary" 66 android:textColor="?android:attr/textColorSecondary" 67 android:maxLines="10" /> 68 69 <ProgressBar 70 android:id="@android:id/progress" 71 android:layout_width="match_parent" 72 android:layout_height="8dp" 73 android:layout_marginTop="8dp" 74 android:layout_below="@android:id/summary" 75 android:layout_alignStart="@android:id/summary" 76 android:max="100" 77 style="?android:attr/progressBarStyleHorizontal" /> 78 79 </RelativeLayout> 80 81 <!-- Preference should place its actual preference widget here. --> 82 <LinearLayout android:id="@android:id/widget_frame" 83 android:layout_width="wrap_content" 84 android:layout_height="match_parent" 85 android:gravity="end|center_vertical" 86 android:paddingStart="16dp" 87 android:orientation="vertical" /> 88 89 </LinearLayout> 90