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.app.list.PhoneFavoriteSquareTileView"
20    android:paddingBottom="@dimen/contact_tile_divider_width"
21    android:paddingEnd="@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:layout_alignParentBottom="true"
56        android:paddingBottom="@dimen/contact_tile_text_bottom_padding"
57        android:paddingStart="@dimen/contact_tile_text_side_padding"
58        android:paddingEnd="@dimen/contact_tile_text_side_padding"
59        android:orientation="vertical">
60
61      <LinearLayout
62          android:layout_width="match_parent"
63          android:layout_height="wrap_content"
64          android:gravity="center_vertical"
65          android:orientation="horizontal">
66        <com.android.dialer.widget.BidiTextView
67            android:id="@+id/contact_tile_name"
68            android:layout_width="0dp"
69            android:layout_height="wrap_content"
70            android:layout_weight="1"
71            android:ellipsize="marquee"
72            android:fadingEdge="horizontal"
73            android:fadingEdgeLength="3dip"
74            android:fontFamily="sans-serif-medium"
75            android:singleLine="true"
76            android:textAlignment="viewStart"
77            android:textColor="?colorTextOnUnthemedDarkBackground"
78            android:textSize="15sp"/>
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:ellipsize="marquee"
92          android:fadingEdge="horizontal"
93          android:fadingEdgeLength="3dip"
94          android:fontFamily="sans-serif"
95          android:gravity="center_vertical"
96          android:singleLine="true"
97          android:textAlignment="viewStart"
98          android:textColor="?colorTextOnUnthemedDarkBackground"
99          android:textSize="11sp"/>
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:background="?android:selectableItemBackground"
107        android:importantForAccessibility="no"/>
108
109    <!-- Wrap the ImageButton in a layout with a transparent background so the ripple has something to draw on -->
110    <FrameLayout
111        android:layout_width="match_parent"
112        android:layout_height="match_parent"
113        android:background="@android:color/transparent">
114      <ImageButton
115          android:id="@id/contact_tile_secondary_button"
116          android:layout_width="@dimen/contact_tile_info_button_height_and_width"
117          android:layout_height="@dimen/contact_tile_info_button_height_and_width"
118          android:layout_gravity="top|end"
119          android:paddingTop="8dp"
120          android:paddingBottom="4dp"
121          android:paddingStart="4dp"
122          android:paddingEnd="4dp"
123          android:background="@drawable/item_background_material_borderless_dark"
124          android:contentDescription="@string/description_view_contact_detail"
125          android:scaleType="center"
126          android:src="@drawable/quantum_ic_more_vert_white_24"/>
127
128    </FrameLayout>
129
130  </RelativeLayout>
131</view>
132