1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 Copyright (C) 2024 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_single_target.xml with buttons added below text. --> 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:minHeight="?android:attr/listPreferredItemHeightSmall" 25 android:gravity="center_vertical" 26 android:orientation="vertical" 27 android:background="?android:attr/selectableItemBackground" 28 android:clipToPadding="false"> 29 30 <LinearLayout 31 android:layout_width="match_parent" 32 android:layout_height="wrap_content" 33 android:layout_weight="1" 34 android:orientation="horizontal" 35 android:gravity="start|center_vertical" 36 android:clipToPadding="false" 37 android:paddingStart="?android:attr/listPreferredItemPaddingStart" 38 android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"> 39 40 <LinearLayout 41 android:id="@+id/icon_frame" 42 android:layout_width="wrap_content" 43 android:layout_height="wrap_content" 44 android:gravity="start|center_vertical" 45 android:minWidth="56dp" 46 android:orientation="horizontal" 47 android:clipToPadding="false" 48 android:paddingTop="4dp" 49 android:paddingBottom="4dp"> 50 <androidx.preference.internal.PreferenceImageView 51 android:id="@android:id/icon" 52 android:layout_width="wrap_content" 53 android:layout_height="wrap_content" 54 settings:maxWidth="48dp" 55 settings:maxHeight="48dp" /> 56 </LinearLayout> 57 58 <RelativeLayout 59 android:layout_width="wrap_content" 60 android:layout_height="wrap_content" 61 android:layout_weight="1" 62 android:paddingTop="16dp" 63 android:paddingBottom="16dp"> 64 65 <TextView 66 android:id="@android:id/title" 67 android:layout_width="wrap_content" 68 android:layout_height="wrap_content" 69 android:singleLine="true" 70 android:textAppearance="?android:attr/textAppearanceListItem" 71 android:ellipsize="marquee" /> 72 73 <TextView 74 android:id="@android:id/summary" 75 android:layout_width="wrap_content" 76 android:layout_height="wrap_content" 77 android:layout_below="@android:id/title" 78 android:layout_alignStart="@android:id/title" 79 android:textAppearance="?android:attr/textAppearanceListItemSecondary" 80 android:textColor="?android:attr/textColorSecondary" 81 android:hyphenationFrequency="normalFast" 82 android:lineBreakWordStyle="phrase" 83 android:maxLines="10" /> 84 85 </RelativeLayout> 86 87 </LinearLayout> 88 89 <!-- Preference should place its actual preference widget here. --> 90 <LinearLayout 91 android:id="@android:id/widget_frame" 92 android:layout_width="wrap_content" 93 android:layout_height="match_parent" 94 android:minWidth="@dimen/two_target_min_width" 95 android:gravity="center" 96 android:orientation="vertical" /> 97 98 <LinearLayout 99 android:id="@+id/credman_button_frame" 100 android:layout_width="wrap_content" 101 android:layout_height="wrap_content" 102 android:gravity="start|center_vertical" 103 android:minWidth="56dp" 104 android:orientation="horizontal" 105 android:clipToPadding="false" 106 android:paddingTop="4dp" 107 android:paddingLeft="76dp" 108 android:paddingBottom="4dp"> 109 110 <Button 111 android:id="@+id/change_button" 112 android:layout_width="match_parent" 113 style="@style/CredentialManagerChangeButton" 114 android:layout_height="wrap_content" 115 android:text="@string/credman_button_change"/> 116 117 <Button 118 android:id="@+id/open_button" 119 style="@style/CredentialManagerOpenButton" 120 android:layout_width="match_parent" 121 android:layout_height="wrap_content" 122 android:visibility="gone" 123 android:text="@string/credman_button_open"/> 124 125 </LinearLayout> 126 127</LinearLayout>