1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- Copyright (C) 2011 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 <view 17 xmlns:android="http://schemas.android.com/apk/res/android" 18 android:id="@+id/contact_tile" 19 class="com.android.dialer.list.PhoneFavoriteSquareTileView" 20 android:paddingEnd="@dimen/contact_tile_divider_width" 21 android:paddingBottom="@dimen/contact_tile_divider_width"> 22 23 <RelativeLayout 24 android:id="@+id/contact_favorite_card" 25 android:layout_width="match_parent" 26 android:layout_height="match_parent" 27 android:focusable="true" > 28 29 <com.android.contacts.common.widget.LayoutSuppressingImageView 30 android:id="@+id/contact_tile_image" 31 android:layout_width="match_parent" 32 android:layout_height="match_parent" 33 android:scaleType="centerCrop" /> 34 35 <LinearLayout 36 android:layout_width="match_parent" 37 android:layout_height="match_parent" 38 android:orientation="vertical"> 39 <View 40 android:layout_width="match_parent" 41 android:layout_height="0dp" 42 android:layout_weight="6" /> 43 <View 44 android:id="@+id/shadow_overlay" 45 android:layout_width="match_parent" 46 android:layout_height="0dp" 47 android:layout_weight="4" 48 android:background="@drawable/shadow_contact_photo" /> 49 </LinearLayout> 50 51 <LinearLayout 52 android:layout_width="match_parent" 53 android:layout_height="wrap_content" 54 android:paddingStart="@dimen/contact_tile_text_side_padding" 55 android:paddingEnd="@dimen/contact_tile_text_side_padding" 56 android:paddingBottom="@dimen/contact_tile_text_bottom_padding" 57 android:layout_alignParentBottom="true" 58 android:orientation="vertical" > 59 60 <LinearLayout 61 android:layout_width="match_parent" 62 android:layout_height="wrap_content" 63 android:orientation="horizontal" 64 android:gravity="center_vertical"> 65 <TextView 66 android:id="@+id/contact_tile_name" 67 android:layout_weight="1" 68 android:layout_width="0dp" 69 android:layout_height="wrap_content" 70 android:textColor="@color/contact_tile_name_color" 71 android:fontFamily="sans-serif-medium" 72 android:singleLine="true" 73 android:textSize="15sp" 74 android:fadingEdge="horizontal" 75 android:fadingEdgeLength="3dip" 76 android:ellipsize="marquee" 77 android:textAlignment="viewStart" /> 78 <ImageView 79 android:id="@+id/contact_star_icon" 80 android:layout_width="@dimen/favorites_star_icon_size" 81 android:layout_height="@dimen/favorites_star_icon_size" 82 android:layout_marginStart="3dp" 83 android:src="@drawable/ic_star" 84 android:visibility="gone" /> 85 </LinearLayout> 86 <TextView 87 android:id="@+id/contact_tile_phone_type" 88 android:layout_width="match_parent" 89 android:layout_height="wrap_content" 90 android:gravity="center_vertical" 91 android:textColor="@color/contact_tile_name_color" 92 android:fontFamily="sans-serif" 93 android:singleLine="true" 94 android:textSize="11sp" 95 android:fadingEdge="horizontal" 96 android:fadingEdgeLength="3dip" 97 android:ellipsize="marquee" 98 android:textAlignment="viewStart" /> 99 </LinearLayout> 100 101 <View 102 android:id="@+id/contact_tile_push_state" 103 android:layout_width="match_parent" 104 android:layout_height="match_parent" 105 android:focusable="true" 106 android:nextFocusRight="@+id/contact_tile_secondary_button" 107 android:background="@drawable/item_background_material_dark" /> 108 109 <ImageButton 110 android:id="@id/contact_tile_secondary_button" 111 android:src="@drawable/ic_more_vert_24dp" 112 android:background="@drawable/item_background_material_dark" 113 android:layout_height="@dimen/contact_tile_info_button_height_and_width" 114 android:layout_width="@dimen/contact_tile_info_button_height_and_width" 115 android:paddingLeft="4dp" 116 android:paddingRight="9dp" 117 android:paddingStart="4dp" 118 android:paddingEnd="4dp" 119 android:paddingTop="8dp" 120 android:paddingBottom="4dp" 121 android:layout_alignParentTop="true" 122 android:layout_alignParentRight="true" 123 android:layout_alignParentEnd="true" 124 android:scaleType="center" 125 android:contentDescription="@string/description_view_contact_detail" /> 126 127 </RelativeLayout> 128 </view> 129