search_contact_row.xml revision 2f1c7586bcce334ca69022eb8dc6d8965ceb6a05
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  ~ Copyright (C) 2017 The Android Open Source Project
4  ~
5  ~ Licensed under the Apache License, Version 2.0 (the "License");
6  ~ you may not use this file except in compliance with the License.
7  ~ You may obtain a copy of the License at
8  ~
9  ~      http://www.apache.org/licenses/LICENSE-2.0
10  ~
11  ~ Unless required by applicable law or agreed to in writing, software
12  ~ distributed under the License is distributed on an "AS IS" BASIS,
13  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  ~ See the License for the specific language governing permissions and
15  ~ limitations under the License
16  -->
17<RelativeLayout
18    xmlns:android="http://schemas.android.com/apk/res/android"
19    android:orientation="horizontal"
20    android:layout_width="match_parent"
21    android:layout_height="@dimen/search_row_height"
22    android:paddingStart="8dp"
23    android:paddingEnd="8dp"
24    android:background="?android:attr/selectableItemBackground">
25
26  <QuickContactBadge
27      android:id="@+id/photo"
28      android:layout_width="@dimen/search_row_height"
29      android:layout_height="@dimen/search_row_height"
30      android:padding="@dimen/search_photo_padding"
31      android:clickable="false"/>
32
33  <LinearLayout
34      android:orientation="vertical"
35      android:layout_width="wrap_content"
36      android:layout_height="wrap_content"
37      android:layout_toEndOf="@+id/photo"
38      android:layout_toStartOf="@+id/call_to_action"
39      android:layout_centerVertical="true">
40
41    <TextView
42        android:id="@+id/primary"
43        android:layout_width="wrap_content"
44        android:layout_height="wrap_content"
45        android:paddingStart="@dimen/search_text_padding_start"
46        android:gravity="center_vertical|start"
47        android:fontFamily="sans-serif"
48        style="@style/PrimaryText"/>
49
50    <TextView
51        android:id="@+id/secondary"
52        android:layout_width="wrap_content"
53        android:layout_height="wrap_content"
54        android:paddingStart="@dimen/search_text_padding_start"
55        android:gravity="center_vertical|start"
56        android:fontFamily="sans-serif"
57        style="@style/SecondaryText"/>
58  </LinearLayout>
59
60  <ImageView
61      android:id="@+id/call_to_action"
62      android:layout_width="@dimen/search_row_height"
63      android:layout_height="@dimen/search_row_height"
64      android:layout_alignParentEnd="true"
65      android:padding="@dimen/call_to_action_padding"
66      android:tint="@color/dialer_secondary_text_color"
67      android:visibility="gone"
68      android:scaleType="center"/>
69</RelativeLayout>