popup_menu_item_layout.xml revision f89b58ca834de833fe45130f49270b3743240b2e
1<?xml version="1.0" encoding="utf-8"?> 2<!-- Copyright (C) 2010 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<com.android.internal.view.menu.ListMenuItemView xmlns:android="http://schemas.android.com/apk/res/android" 18 android:layout_width="match_parent" 19 android:layout_height="?attr/dropdownListPreferredItemHeight" 20 android:minWidth="196dip" 21 android:paddingEnd="16dip"> 22 23 <!-- Icon will be inserted here. --> 24 25 <!-- The title and summary have some gap between them, and this 'group' should be centered vertically. --> 26 <RelativeLayout 27 android:layout_width="0dip" 28 android:layout_weight="1" 29 android:layout_height="wrap_content" 30 android:layout_gravity="center_vertical" 31 android:layout_marginStart="16dip" 32 android:duplicateParentState="true"> 33 34 <TextView 35 android:id="@+id/title" 36 android:layout_width="match_parent" 37 android:layout_height="wrap_content" 38 android:layout_alignParentTop="true" 39 android:layout_alignParentStart="true" 40 android:textAppearance="?attr/textAppearanceLargePopupMenu" 41 android:singleLine="true" 42 android:duplicateParentState="true" 43 android:ellipsize="marquee" 44 android:fadingEdge="horizontal" 45 android:textAlignment="viewStart" /> 46 47 <TextView 48 android:id="@+id/shortcut" 49 android:layout_width="wrap_content" 50 android:layout_height="wrap_content" 51 android:layout_below="@id/title" 52 android:layout_alignParentStart="true" 53 android:textAppearance="?attr/textAppearanceSmallPopupMenu" 54 android:singleLine="true" 55 android:duplicateParentState="true" 56 android:textAlignment="viewStart" /> 57 58 </RelativeLayout> 59 60 <!-- Checkbox, and/or radio button will be inserted here. --> 61 62</com.android.internal.view.menu.ListMenuItemView> 63