1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  ~ Copyright (C) 2015 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
18<LinearLayout
19  xmlns:android="http://schemas.android.com/apk/res/android"
20  android:id="@+id/call_subject_dialog"
21  android:layout_width="match_parent"
22  android:layout_height="match_parent"
23  android:background="@android:color/transparent"
24  android:orientation="vertical">
25
26  <RelativeLayout
27    android:layout_width="match_parent"
28    android:layout_height="0dp"
29    android:layout_weight="1">
30
31    <!-- The call subject dialog will be centered in the space above the subject list. -->
32    <LinearLayout
33      android:id="@+id/dialog_view"
34      android:layout_width="match_parent"
35      android:layout_height="wrap_content"
36      android:layout_centerInParent="true"
37      android:background="@drawable/dialog_background_material"
38      android:clickable="true"
39      android:elevation="16dp"
40      android:orientation="vertical"
41      android:theme="@android:style/Theme.Material.Light.Dialog">
42
43      <LinearLayout
44        android:layout_width="match_parent"
45        android:layout_height="wrap_content"
46        android:layout_marginTop="@dimen/call_subject_dialog_margin"
47        android:layout_marginStart="@dimen/call_subject_dialog_margin"
48        android:layout_marginEnd="@dimen/call_subject_dialog_margin"
49        android:orientation="horizontal">
50
51        <QuickContactBadge
52          android:id="@+id/contact_photo"
53          android:layout_width="@dimen/call_subject_dialog_contact_photo_size"
54          android:layout_height="@dimen/call_subject_dialog_contact_photo_size"
55          android:layout_marginEnd="@dimen/call_subject_dialog_margin"
56          android:layout_gravity="top"
57          android:focusable="true"/>
58
59        <LinearLayout
60          android:layout_width="match_parent"
61          android:layout_height="wrap_content"
62          android:gravity="center_vertical"
63          android:orientation="vertical">
64
65          <TextView
66            android:id="@+id/name"
67            android:layout_width="wrap_content"
68            android:layout_height="wrap_content"
69            android:singleLine="true"
70            android:textColor="?android:attr/textColorPrimary"
71            android:textSize="@dimen/call_subject_dialog_secondary_text_size"/>
72
73          <TextView
74            android:id="@+id/number"
75            android:layout_width="wrap_content"
76            android:layout_height="wrap_content"
77            android:layout_marginTop="@dimen/call_subject_dialog_between_line_margin"
78            android:layout_gravity="center_vertical"
79            android:singleLine="true"
80            android:textColor="?android:attr/textColorSecondary"
81            android:textSize="@dimen/call_subject_dialog_secondary_text_size"/>
82        </LinearLayout>
83      </LinearLayout>
84
85      <EditText
86        android:id="@+id/call_subject"
87        android:layout_width="match_parent"
88        android:layout_height="0dp"
89        android:layout_weight="1"
90        android:layout_marginTop="@dimen/call_subject_dialog_edit_spacing"
91        android:layout_marginStart="@dimen/call_subject_dialog_margin"
92        android:layout_marginEnd="@dimen/call_subject_dialog_margin"
93        android:layout_gravity="top"
94        android:background="@null"
95        android:gravity="top"
96        android:hint="@string/call_subject_hint"
97        android:textColor="?android:attr/textColorSecondary"
98        android:textSize="@dimen/call_subject_dialog_secondary_text_size"
99        />
100
101      <TextView
102        android:id="@+id/character_limit"
103        android:layout_width="wrap_content"
104        android:layout_height="wrap_content"
105        android:layout_marginTop="@dimen/call_subject_dialog_margin"
106        android:layout_marginBottom="@dimen/call_subject_dialog_margin"
107        android:layout_marginStart="@dimen/call_subject_dialog_margin"
108        android:layout_marginEnd="@dimen/call_subject_dialog_margin"
109        android:singleLine="true"
110        android:textColor="?android:attr/textColorSecondary"
111        android:textSize="@dimen/call_subject_dialog_secondary_text_size"/>
112
113      <View
114        android:layout_width="fill_parent"
115        android:layout_height="1dp"
116        android:background="@color/call_subject_divider"/>
117
118      <RelativeLayout
119        android:layout_width="match_parent"
120        android:layout_height="wrap_content"
121        android:layout_marginTop="@dimen/call_subject_dialog_margin"
122        android:layout_marginBottom="@dimen/call_subject_dialog_margin"
123        android:layout_marginStart="@dimen/call_subject_dialog_margin"
124        android:layout_marginEnd="@dimen/call_subject_dialog_margin">
125
126        <ImageView
127          android:id="@+id/history_button"
128          android:layout_width="25dp"
129          android:layout_height="25dp"
130          android:layout_alignParentStart="true"
131          android:layout_centerVertical="true"
132          android:src="@drawable/quantum_ic_history_vd_theme_24"
133          android:tint="?colorIcon"/>
134
135        <TextView
136          android:id="@+id/send_and_call_button"
137          android:layout_width="wrap_content"
138          android:layout_height="wrap_content"
139          android:layout_alignParentEnd="true"
140          android:layout_centerVertical="true"
141          android:singleLine="true"
142          android:text="@string/send_and_call_button"
143          android:textColor="@color/call_subject_button"
144          android:textSize="@dimen/call_subject_dialog_secondary_text_size"/>
145
146      </RelativeLayout>
147    </LinearLayout>
148  </RelativeLayout>
149  <!-- The subject list is pinned to the bottom of the screen. -->
150  <ListView
151    android:id="@+id/subject_list"
152    android:layout_width="match_parent"
153    android:layout_height="wrap_content"
154    android:layout_below="@id/dialog_view"
155    android:background="?android:attr/colorBackground"
156    android:divider="@null"
157    android:elevation="8dp"/>
158
159</LinearLayout>
160