blob: 44ab682ba62124f569fa1ac6d90820abf8375e72 [file] [log] [blame]
Adrien Béraudfb6341f2016-03-07 16:18:54 -05001<?xml version="1.0" encoding="utf-8"?><!--
2Copyright (C) 2004-2016 Savoir-faire Linux Inc.
3
4Author: Adrien Beraud <adrien.beraud@savoirfairelinux.com>
5
6This program is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 3 of the License, or
9(at your option) any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with this program. If not, see <http://www.gnu.org/licenses/>.
18-->
Adrien Béraudbc0898e2018-08-23 14:31:11 -040019<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
Adrien Béraudda712a42015-11-22 23:45:26 -050020 xmlns:app="http://schemas.android.com/apk/res-auto"
Adrien Béraudb179bab2015-10-08 12:04:22 -040021 xmlns:tools="http://schemas.android.com/tools"
22 android:layout_width="match_parent"
23 android:layout_height="match_parent"
Adrien Béraudbbab0d52018-03-28 10:25:18 -040024 android:keepScreenOn="true"
Adrien Béraudb179bab2015-10-08 12:04:22 -040025 tools:context=".client.CallActivity">
Adrien Béraud04d822c2015-04-02 17:44:36 -040026
Adrien Béraudbc0898e2018-08-23 14:31:11 -040027 <RelativeLayout
Adrien Béraudfb6341f2016-03-07 16:18:54 -050028 android:layout_width="match_parent"
Adrien Béraudbc0898e2018-08-23 14:31:11 -040029 android:layout_height="match_parent">
Adrien Béraud04d822c2015-04-02 17:44:36 -040030
Adrien Béraudbc0898e2018-08-23 14:31:11 -040031 <SurfaceView
32 android:id="@+id/video_preview_surface"
Pierre Ducheminbb833672018-03-09 16:18:33 -050033 android:layout_width="match_parent"
Adrien Béraudbc0898e2018-08-23 14:31:11 -040034 android:layout_height="32dp"
35 android:layout_centerInParent="true"
36 android:layout_gravity="center"
Hadrien De Sousaccc947d2017-04-12 14:26:52 -040037 android:visibility="gone"
Hadrien De Sousaccc947d2017-04-12 14:26:52 -040038 tools:visibility="visible" />
Adrien Béraudfb6341f2016-03-07 16:18:54 -050039
Adrien Béraudbc0898e2018-08-23 14:31:11 -040040 <SurfaceView
41 android:id="@+id/camera_preview_surface"
42 android:layout_width="160dp"
43 android:layout_height="120dp"
44 android:layout_alignParentEnd="true"
45 android:layout_alignParentBottom="true"
46 android:layout_margin="12dp"
47 android:visibility="gone"
48 tools:visibility="visible" />
49 </RelativeLayout>
50
51 <RelativeLayout
52 android:layout_width="match_parent"
53 android:layout_height="match_parent"
54 android:clipToPadding="false"
55 android:fitsSystemWindows="true"
56 android:animateLayoutChanges="true">
57
58 <LinearLayout
59 android:id="@+id/contact_bubble_layout"
Hadrien De Sousaccc947d2017-04-12 14:26:52 -040060 android:layout_width="match_parent"
61 android:layout_height="wrap_content"
Adrien Béraudbc0898e2018-08-23 14:31:11 -040062 android:layout_centerInParent="true"
63 android:gravity="center"
64 android:orientation="vertical"
65 android:visibility="invisible">
Hadrien De Sousaccc947d2017-04-12 14:26:52 -040066
Adrien Béraudbc0898e2018-08-23 14:31:11 -040067 <RelativeLayout
68 android:layout_width="match_parent"
69 android:layout_height="230dp">
Adrien Béraudfb6341f2016-03-07 16:18:54 -050070
Adrien Béraudbc0898e2018-08-23 14:31:11 -040071 <com.rodolfonavalon.shaperipplelibrary.ShapeRipple
72 android:id="@+id/shape_ripple"
73 android:layout_width="match_parent"
74 android:layout_height="match_parent"
75 app:enable_color_transition="true"
76 app:ripple_color="@color/white"
77 app:ripple_count="3"
78 app:ripple_duration="5000"
79 app:ripple_stroke_width="15dp" />
80
81 <ImageView
82 android:id="@+id/contact_bubble"
83 android:layout_width="160dp"
84 android:layout_height="160dp"
85 android:layout_centerInParent="true"
86 tools:src="@drawable/ic_contact_picture_fallback" />
87 </RelativeLayout>
88
89 <TextView
90 android:id="@+id/contact_bubble_txt"
91 android:layout_width="match_parent"
92 android:layout_height="wrap_content"
93 android:ellipsize="middle"
94 android:gravity="center_horizontal"
95 android:paddingStart="32dp"
96 android:paddingEnd="32dp"
97 android:singleLine="true"
98 android:textAppearance="?android:attr/textAppearanceLarge"
99 android:textColor="@color/text_color_primary_dark"
100 tools:text="Contact Name" />
101
102 <TextView
103 android:id="@+id/contact_bubble_num_txt"
104 android:layout_width="match_parent"
105 android:layout_height="wrap_content"
106 android:ellipsize="middle"
107 android:gravity="center_horizontal"
108 android:paddingStart="32dp"
109 android:paddingEnd="32dp"
110 android:singleLine="true"
111 android:textAppearance="?android:attr/textAppearanceMedium"
112 android:textColor="@color/text_color_secondary_dark"
113 android:visibility="gone"
114 tools:text="ring:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
115 tools:visibility="visible" />
116
117 <TextView
118 android:id="@+id/call_status_txt"
119 android:layout_width="match_parent"
120 android:layout_height="wrap_content"
121 android:gravity="center_horizontal"
122 android:paddingStart="32dp"
123 android:paddingEnd="32dp"
124 android:textColor="@color/text_color_primary_dark"
125 android:textSize="16sp"
126 tools:text="Connecting" />
127 </LinearLayout>
128
129 <LinearLayout
Adrien Béraudfb6341f2016-03-07 16:18:54 -0500130 android:layout_width="wrap_content"
131 android:layout_height="wrap_content"
Adrien Béraudbc0898e2018-08-23 14:31:11 -0400132 android:layout_below="@+id/contact_bubble_layout"
133 android:layout_centerHorizontal="true"
134 android:orientation="horizontal"
135 tools:visibility="gone">
136
137 <android.support.design.widget.FloatingActionButton
138 android:id="@+id/call_refuse_btn"
139 android:layout_width="wrap_content"
140 android:layout_height="wrap_content"
141 android:layout_margin="16dp"
142 android:contentDescription="@string/action_call_decline"
143 app:backgroundTint="@color/error_red"
144 app:elevation="6dp"
145 app:fabSize="normal"
146 app:pressedTranslationZ="12dp"
147 app:rippleColor="@android:color/white"
148 app:srcCompat="@drawable/ic_call_end_white"
149 app:useCompatPadding="true" />
150
151 <android.support.design.widget.FloatingActionButton
152 android:id="@+id/call_accept_btn"
153 android:layout_width="wrap_content"
154 android:layout_height="wrap_content"
155 android:layout_margin="16dp"
156 android:contentDescription="@string/action_call_accept"
157 app:backgroundTint="#4caf50"
158 app:elevation="6dp"
159 app:fabSize="normal"
160 app:pressedTranslationZ="12dp"
161 app:rippleColor="@android:color/white"
162 app:srcCompat="@drawable/ic_call_white"
163 app:useCompatPadding="true" />
164
165 </LinearLayout>
166
167 <LinearLayout
168 android:id="@+id/call_control_group"
169 android:layout_width="wrap_content"
170 android:layout_height="wrap_content"
171 android:layout_alignParentStart="true"
172 android:layout_alignParentBottom="true"
173 android:layout_marginStart="16dp"
174 android:layout_marginBottom="16dp"
175 android:gravity="center"
176 android:orientation="vertical"
177 android:visibility="gone"
178 tools:visibility="visible">
179
180 <ImageButton
181 android:id="@+id/call_camera_flip_btn"
182 android:layout_width="wrap_content"
183 android:layout_height="wrap_content"
184 android:layout_margin="12dp"
185 android:background="@drawable/call_button_background"
186 android:contentDescription="@string/ab_action_flipcamera"
187 android:padding="16dp"
188 android:tint="@color/white"
189 app:srcCompat="@drawable/ic_camera_front_white" />
190
191 <cx.ring.views.CheckableImageButton
192 android:id="@+id/call_mic_btn"
193 android:layout_width="wrap_content"
194 android:layout_height="wrap_content"
195 android:layout_margin="12dp"
196 android:background="@drawable/call_button_background"
197 android:contentDescription="Mute microphone"
198 android:padding="16dp"
199 android:tint="@color/white"
200 app:srcCompat="@drawable/baseline_mic_off_24"
201 tools:visibility="visible" />
202
203 <cx.ring.views.CheckableImageButton
204 android:id="@+id/call_speaker_btn"
205 android:layout_width="wrap_content"
206 android:layout_height="wrap_content"
207 android:layout_margin="12dp"
208 android:background="@drawable/call_button_background"
209 android:contentDescription="@string/ab_action_speakerphone"
210 android:padding="16dp"
211 android:tint="@color/white"
212 app:srcCompat="@drawable/baseline_volume_up_24" />
213
214 </LinearLayout>
215
216 <EditText
217 android:id="@+id/dialpad_edit_text"
218 android:layout_width="0dp"
219 android:layout_height="wrap_content"
220 android:ems="10"
221 android:inputType="phone"
222 android:visibility="visible" />
223
224 <android.support.design.widget.FloatingActionButton
225 android:id="@+id/call_hangup_btn"
226 android:layout_width="wrap_content"
227 android:layout_height="wrap_content"
228 android:layout_alignParentBottom="true"
229 android:layout_centerHorizontal="true"
230 android:layout_marginBottom="4dp"
231 android:contentDescription="@string/action_call_hangup"
Adrien Béraudb179bab2015-10-08 12:04:22 -0400232 app:backgroundTint="@color/error_red"
Adrien Béraudb179bab2015-10-08 12:04:22 -0400233 app:elevation="6dp"
Adrien Béraudbc0898e2018-08-23 14:31:11 -0400234 app:fabSize="normal"
Adrien Béraudb179bab2015-10-08 12:04:22 -0400235 app:pressedTranslationZ="12dp"
Pierre Duchemina5529292017-12-18 17:25:54 -0500236 app:rippleColor="@android:color/white"
Pierre Duchemin3c9cb302017-12-26 12:16:47 -0500237 app:srcCompat="@drawable/ic_call_end_white"
238 app:useCompatPadding="true" />
Adrien Béraudb179bab2015-10-08 12:04:22 -0400239
Adrien Béraudbc0898e2018-08-23 14:31:11 -0400240 </RelativeLayout>
241</FrameLayout>