1<?xml version="1.0" encoding="utf-8"?> 2<!-- Copyright (C) 2013 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="fill_parent" 19 android:layout_height="wrap_content" 20 android:paddingStart="?android:attr/listPreferredItemPaddingStart" 21 android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" 22 android:minHeight="?android:attr/listPreferredItemHeight" 23 android:orientation="horizontal" 24 android:gravity="start|center_vertical"> 25 26 <ImageView 27 android:id="@+id/icon" 28 android:layout_width="40dip" 29 android:layout_height="40dip" 30 android:layout_gravity="center_vertical" 31 android:duplicateParentState="true" 32 android:contentDescription="@null" 33 android:visibility="invisible"> 34 </ImageView> 35 36 <RelativeLayout 37 android:layout_width="0dip" 38 android:layout_weight="1" 39 android:layout_height="wrap_content" 40 android:layout_gravity="center_vertical" 41 android:layout_marginStart="16dip" 42 android:duplicateParentState="true"> 43 44 <TextView 45 android:id="@+id/title" 46 android:layout_width="wrap_content" 47 android:layout_height="wrap_content" 48 android:textAppearance="?android:attr/textAppearanceListItem" 49 android:singleLine="true" 50 android:ellipsize="end" 51 android:duplicateParentState="true" /> 52 53 <TextView 54 android:id="@+id/subtitle" 55 android:layout_width="wrap_content" 56 android:layout_height="wrap_content" 57 android:layout_below="@id/title" 58 android:textAppearance="?android:attr/textAppearanceListItemSecondary" 59 android:textColor="?android:attr/textColorSecondary" 60 android:singleLine="true" 61 android:ellipsize="end" 62 android:visibility="gone" 63 android:duplicateParentState="true" /> 64 65 </RelativeLayout> 66 67 <!-- wrapper for image view to increase the touch target size --> 68 <LinearLayout 69 android:id="@+id/more_info" 70 android:layout_width="wrap_content" 71 android:layout_height="fill_parent" 72 android:visibility="gone"> 73 74 <ImageView 75 android:layout_width="wrap_content" 76 android:layout_height="wrap_content" 77 android:layout_gravity="center_vertical" 78 android:paddingLeft="16dip" 79 android:contentDescription="@string/printer_info_desc" 80 android:src="@*android:drawable/ic_info" 81 android:tint="?android:attr/colorControlNormal" 82 android:tintMode="src_in" /> 83 84 </LinearLayout> 85 86</LinearLayout> 87