1<?xml version="1.0" encoding="utf-8"?> 2<!-- Copyright (C) 2016 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<!-- Layout used by SeekBarPreference for the seekbar widget style. --> 18<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 19 android:layout_width="match_parent" 20 android:layout_height="wrap_content" 21 android:minHeight="?android:attr/listPreferredItemHeight" 22 android:gravity="center_vertical" 23 android:paddingEnd="?android:attr/scrollbarSize" 24 android:clipChildren="false" 25 android:clipToPadding="false"> 26 27 <ImageView 28 android:id="@android:id/icon" 29 android:layout_width="wrap_content" 30 android:layout_height="wrap_content" 31 android:layout_gravity="center" 32 android:minWidth="@dimen/preference_icon_minWidth"/> 33 34 <RelativeLayout 35 android:layout_width="wrap_content" 36 android:layout_height="wrap_content" 37 android:layout_marginStart="16dip" 38 android:layout_marginEnd="8dip" 39 android:layout_marginTop="6dip" 40 android:layout_marginBottom="6dip" 41 android:layout_weight="1" 42 android:clipChildren="false" 43 android:clipToPadding="false"> 44 45 <TextView android:id="@android:id/title" 46 android:layout_width="wrap_content" 47 android:layout_height="wrap_content" 48 android:singleLine="true" 49 android:textAppearance="?android:attr/textAppearanceMedium" 50 android:ellipsize="marquee" 51 android:fadingEdge="horizontal"/> 52 53 <TextView android:id="@android:id/summary" 54 android:layout_width="wrap_content" 55 android:layout_height="wrap_content" 56 android:layout_below="@android:id/title" 57 android:layout_alignStart="@android:id/title" 58 android:textAppearance="?android:attr/textAppearanceSmall" 59 android:textColor="?android:attr/textColorSecondary" 60 android:maxLines="4"/> 61 62 <!-- Using UnPressableLinearLayout as a workaround to disable the pressed state propagation 63 to the children of this container layout. Otherwise, the animated pressed state will also 64 play for the thumb in the AbsSeekBar in addition to the preference's ripple background. 65 The background of the SeekBar is also set to null to disable the ripple background --> 66 <androidx.preference.UnPressableLinearLayout 67 android:layout_width="match_parent" 68 android:layout_height="wrap_content" 69 android:layout_below="@android:id/summary" 70 android:layout_alignStart="@android:id/title" 71 android:clipChildren="false" 72 android:clipToPadding="false"> 73 <SeekBar 74 android:id="@+id/seekbar" 75 android:layout_width="0dp" 76 android:layout_weight="1" 77 android:layout_height="wrap_content" 78 android:paddingStart="@dimen/preference_seekbar_padding_start" 79 android:paddingEnd="@dimen/preference_seekbar_padding_end" 80 android:focusable="false" 81 android:clickable="false" 82 android:background="@null" /> 83 84 <TextView android:id="@+id/seekbar_value" 85 android:layout_width="@dimen/preference_seekbar_value_width" 86 android:layout_height="match_parent" 87 android:gravity="right|center_vertical" 88 android:fontFamily="sans-serif-condensed" 89 android:singleLine="true" 90 android:textAppearance="?android:attr/textAppearanceMedium" 91 android:ellipsize="marquee" 92 android:fadingEdge="horizontal"/> 93 </androidx.preference.UnPressableLinearLayout> 94 95 </RelativeLayout> 96 97</LinearLayout> 98