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 android:nextFocusRight="@+id/contact_tile_secondary_button"> 29 30 <com.android.contacts.common.widget.LayoutSuppressingImageView 31 android:id="@+id/contact_tile_image" 32 android:layout_width="match_parent" 33 android:layout_height="match_parent" 34 android:scaleType="centerCrop" /> 35 36 <LinearLayout 37 android:layout_width="match_parent" 38 android:layout_height="match_parent" 39 android:orientation="vertical"> 40 <View 41 android:layout_width="match_parent" 42 android:layout_height="0dp" 43 android:layout_weight="6" /> 44 <View 45 android:id="@+id/shadow_overlay" 46 android:layout_width="match_parent" 47 android:layout_height="0dp" 48 android:layout_weight="4" 49 android:background="@drawable/shadow_contact_photo" /> 50 </LinearLayout> 51 52 <LinearLayout 53 android:layout_width="match_parent" 54 android:layout_height="wrap_content" 55 android:paddingStart="@dimen/contact_tile_text_side_padding" 56 android:paddingEnd="@dimen/contact_tile_text_side_padding" 57 android:paddingBottom="@dimen/contact_tile_text_bottom_padding" 58 android:layout_alignParentBottom="true" 59 android:orientation="vertical" > 60 61 <LinearLayout 62 android:layout_width="match_parent" 63 android:layout_height="wrap_content" 64 android:orientation="horizontal" 65 android:gravity="center_vertical"> 66 <TextView 67 android:id="@+id/contact_tile_name" 68 android:layout_weight="1" 69 android:layout_width="0dp" 70 android:layout_height="wrap_content" 71 android:textColor="@color/contact_tile_name_color" 72 android:fontFamily="sans-serif-medium" 73 android:singleLine="true" 74 android:textSize="15sp" 75 android:fadingEdge="horizontal" 76 android:fadingEdgeLength="3dip" 77 android:ellipsize="marquee" 78 android:textAlignment="viewStart" /> 79 <ImageView 80 android:id="@+id/contact_star_icon" 81 android:layout_width="@dimen/favorites_star_icon_size" 82 android:layout_height="@dimen/favorites_star_icon_size" 83 android:layout_marginStart="3dp" 84 android:src="@drawable/ic_star" 85 android:visibility="gone" /> 86 </LinearLayout> 87 <TextView 88 android:id="@+id/contact_tile_phone_type" 89 android:layout_width="match_parent" 90 android:layout_height="wrap_content" 91 android:gravity="center_vertical" 92 android:textColor="@color/contact_tile_name_color" 93 android:fontFamily="sans-serif" 94 android:singleLine="true" 95 android:textSize="11sp" 96 android:fadingEdge="horizontal" 97 android:fadingEdgeLength="3dip" 98 android:ellipsize="marquee" 99 android:textAlignment="viewStart" /> 100 </LinearLayout> 101 102 <View 103 android:id="@+id/contact_tile_push_state" 104 android:layout_width="match_parent" 105 android:layout_height="match_parent" 106 android:importantForAccessibility="no" 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