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:textAppearance="?android:attr/textAppearanceMedium" 53 android:singleLine="true" 54 android:fadingEdge="horizontal" 55 android:fadingEdgeLength="3dip" 56 android:ellipsize="marquee" 57 android:textAlignment="viewStart" /> 58 <TextView 59 android:id="@+id/contact_tile_phone_type" 60 android:layout_height="wrap_content" 61 android:layout_width="wrap_content" 62 android:textSize="12sp" 63 android:ellipsize="marquee" 64 android:singleLine="true" 65 android:textColor="@color/dialtacts_secondary_text_color" /> 66 </LinearLayout> 67 <ImageView 68 android:id="@+id/contact_favorite_star" 69 android:layout_width="wrap_content" 70 android:layout_height="wrap_content" 71 android:layout_alignRight="@id/contact_tile_quick" 72 android:layout_alignEnd="@id/contact_tile_quick" 73 android:layout_alignBottom="@id/contact_tile_quick" 74 android:layout_marginRight="7dip" 75 android:layout_marginEnd="7dip" 76 android:layout_marginBottom="7dip" 77 android:src="@drawable/ic_star_marked_as_fav" 78 android:visibility="gone" /> 79 80 </RelativeLayout> 81 82 <LinearLayout 83 android:id="@+id/favorite_remove_dialogue" 84 android:orientation="horizontal" 85 android:layout_width="match_parent" 86 android:layout_height="match_parent" 87 android:layout_alignParentLeft="true" 88 android:layout_alignParentStart="true" 89 android:gravity="center_vertical" 90 android:alpha="0.0" 91 android:visibility="gone"> 92 93 <TextView 94 android:id="@+id/favorite_remove_dialogue_text" 95 android:layout_width="wrap_content" 96 android:layout_height="match_parent" 97 android:layout_weight="1" 98 android:paddingStart="@dimen/favorites_row_undo_text_side_padding" 99 android:paddingEnd="@dimen/favorites_row_undo_text_side_padding" 100 android:text="@string/favorite_hidden" 101 android:ellipsize="marquee" 102 android:fontFamily="sans-serif" 103 android:textSize="14sp" 104 android:textColor="@color/undo_dialogue_text_color" 105 android:singleLine="true" 106 android:gravity="center_vertical" 107 android:textDirection="ltr" /> 108 109 <View 110 android:id="@+id/undo_separator" 111 android:layout_width="1dip" 112 android:layout_height="match_parent" 113 android:background="@color/undo_dialogue_text_color" 114 android:layout_marginTop="16dp" 115 android:layout_marginBottom="16dp" /> 116 117 <LinearLayout 118 android:id="@+id/favorite_remove_undo_button" 119 android:orientation="vertical" 120 android:layout_width="wrap_content" 121 android:layout_height="match_parent" 122 android:clickable="true" 123 android:paddingStart="30dp" 124 android:paddingEnd="30dp" 125 android:background="?android:attr/selectableItemBackground" 126 android:gravity="center_vertical"> 127 128 <ImageView 129 android:layout_width="match_parent" 130 android:layout_height="wrap_content" 131 android:src="@drawable/ic_fav_undo_dk"/> 132 133 <TextView 134 android:layout_width="match_parent" 135 android:layout_height="wrap_content" 136 android:fontFamily="sans-serif-light" 137 android:textSize="13sp" 138 android:ellipsize="marquee" 139 android:singleLine="true" 140 android:text="@string/favorite_hidden_undo" 141 android:textColor="@color/undo_dialogue_text_color" 142 android:textAlignment="center"/> 143 </LinearLayout> 144 </LinearLayout> 145 </view> 146