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<!-- Based off preference_material_settings.xml except that the ripple effect is active only on 19 the left side. --> 20<LinearLayout 21 xmlns:android="http://schemas.android.com/apk/res/android" 22 xmlns:settings="http://schemas.android.com/apk/res-auto" 23 android:layout_width="match_parent" 24 android:layout_height="wrap_content" 25 android:minHeight="?android:attr/listPreferredItemHeightSmall" 26 android:gravity="center_vertical" 27 android:background="?android:attr/selectableItemBackground" 28 android:clipToPadding="false" 29 android:paddingStart="@dimen/lb_preference_item_padding_start" 30 android:paddingEnd="@dimen/lb_preference_item_padding_end"> 31 32 <LinearLayout 33 android:layout_width="0dp" 34 android:layout_height="match_parent" 35 android:layout_weight="1" 36 android:gravity="start|center_vertical" 37 android:clipToPadding="false"> 38 39 <FrameLayout 40 android:id="@+id/icon_frame" 41 android:layout_width="wrap_content" 42 android:layout_height="wrap_content" 43 android:layout_gravity="center_vertical" > 44 <ImageView 45 android:id="@android:id/icon" 46 android:layout_width="@dimen/lb_preference_item_icon_size" 47 android:layout_height="@dimen/lb_preference_item_icon_size" 48 android:layout_marginEnd="@dimen/lb_preference_item_icon_margin_end" 49 /> 50 </FrameLayout> 51 52 <RelativeLayout 53 android:layout_width="wrap_content" 54 android:layout_height="wrap_content" 55 android:layout_weight="1" 56 android:paddingTop="16dp" 57 android:paddingBottom="16dp"> 58 59 <TextView 60 android:id="@android:id/title" 61 android:layout_width="wrap_content" 62 android:layout_height="wrap_content" 63 android:singleLine="true" 64 android:layout_marginBottom="@dimen/lb_preference_item_primary_text_margin_bottom" 65 android:fontFamily="sans-serif" 66 android:textColor="@color/lb_preference_item_primary_text_color" 67 android:textSize="@dimen/lb_preference_item_primary_text_size" 68 android:ellipsize="marquee" /> 69 70 <TextView 71 android:id="@android:id/summary" 72 android:layout_width="wrap_content" 73 android:layout_height="wrap_content" 74 android:layout_below="@android:id/title" 75 android:layout_alignStart="@android:id/title" 76 android:fontFamily="sans-serif-condensed" 77 android:textColor="@color/lb_preference_item_secondary_text_color" 78 android:textSize="@dimen/lb_preference_item_secondary_text_size" 79 android:maxLines="10" /> 80 81 </RelativeLayout> 82 83 </LinearLayout> 84 85 <include layout="@layout/preference_two_target_divider" /> 86 87 <!-- Preference should place its actual preference widget here. --> 88 <LinearLayout 89 android:id="@android:id/widget_frame" 90 android:layout_width="wrap_content" 91 android:layout_height="match_parent" 92 android:minWidth="64dp" 93 android:gravity="center" 94 android:orientation="vertical" /> 95 96</LinearLayout> 97