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 17 <!-- Layout parameters are set programmatically. --> 18 <view 19 xmlns:android="http://schemas.android.com/apk/res/android" 20 android:id="@+id/contact_tile" 21 class="com.android.dialer.list.PhoneFavoriteRegularRowView"> 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.LayoutSuppressingQuickContactBadge 30 android:id="@+id/contact_tile_quick" 31 android:layout_width="64dip" 32 android:layout_height="64dip" 33 android:layout_alignParentLeft="true" 34 android:layout_alignParentStart="true" 35 android:nextFocusRight="@id/contact_tile" 36 android:scaleType="centerCrop" 37 android:focusable="true" /> 38 39 <LinearLayout 40 android:layout_width="match_parent" 41 android:layout_height="wrap_content" 42 android:layout_marginLeft="8dip" 43 android:layout_marginStart="8dip" 44 android:layout_toRightOf="@id/contact_tile_quick" 45 android:layout_toEndOf="@id/contact_tile_quick" 46 android:layout_centerVertical="true" 47 android:orientation="vertical"> 48 <TextView 49 android:id="@id/contact_tile_name" 50 android:layout_width="match_parent" 51 android:layout_height="wrap_content" 52 android:textSize="16sp" 53 android:textColor="@color/dialtacts_primary_text_color"/> 54 android:singleLine="true" 55 android:fadingEdge="horizontal" 56 android:fadingEdgeLength="3dip" 57 android:ellipsize="marquee" 58 android:textAlignment="viewStart" /> 59 <TextView 60 android:id="@+id/contact_tile_phone_type" 61 android:layout_height="wrap_content" 62 android:layout_width="wrap_content" 63 android:textSize="12sp" 64 android:ellipsize="marquee" 65 android:singleLine="true" 66 android:textColor="@color/dialtacts_secondary_text_color" /> 67 </LinearLayout> 68 69 </RelativeLayout> 70 71 <LinearLayout 72 android:id="@+id/favorite_remove_dialogue" 73 android:orientation="horizontal" 74 android:layout_width="match_parent" 75 android:layout_height="match_parent" 76 android:layout_alignParentLeft="true" 77 android:layout_alignParentStart="true" 78 android:gravity="center_vertical" 79 android:alpha="0.0" 80 android:visibility="gone"> 81 82 <TextView 83 android:id="@+id/favorite_remove_dialogue_text" 84 android:layout_width="wrap_content" 85 android:layout_height="match_parent" 86 android:layout_weight="1" 87 android:paddingStart="@dimen/favorites_row_undo_text_side_padding" 88 android:paddingEnd="@dimen/favorites_row_undo_text_side_padding" 89 android:text="@string/favorite_hidden" 90 android:ellipsize="marquee" 91 android:fontFamily="sans-serif" 92 android:textSize="14sp" 93 android:textColor="@color/undo_dialogue_text_color" 94 android:singleLine="true" 95 android:gravity="center_vertical" 96 android:textDirection="ltr" /> 97 98 <View 99 android:id="@+id/undo_separator" 100 android:layout_width="1dip" 101 android:layout_height="match_parent" 102 android:background="@color/undo_dialogue_text_color" 103 android:layout_marginTop="16dp" 104 android:layout_marginBottom="16dp" /> 105 106 <LinearLayout 107 android:id="@+id/favorite_remove_undo_button" 108 android:orientation="vertical" 109 android:layout_width="wrap_content" 110 android:layout_height="match_parent" 111 android:clickable="true" 112 android:paddingStart="30dp" 113 android:paddingEnd="30dp" 114 android:background="?android:attr/selectableItemBackground" 115 android:gravity="center_vertical"> 116 117 <ImageView 118 android:layout_width="match_parent" 119 android:layout_height="wrap_content" 120 android:src="@drawable/ic_fav_undo_dk"/> 121 122 <TextView 123 android:layout_width="match_parent" 124 android:layout_height="wrap_content" 125 android:fontFamily="sans-serif-light" 126 android:textSize="13sp" 127 android:ellipsize="marquee" 128 android:singleLine="true" 129 android:text="@string/favorite_hidden_undo" 130 android:textColor="@color/undo_dialogue_text_color" 131 android:textAlignment="center"/> 132 </LinearLayout> 133 </LinearLayout> 134 </view> 135