blob: dbfbf60e0de93448a0dadce33902096d28520347 [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éraud86a1e372018-11-23 23:24:30 -050019<layout 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éraud86a1e372018-11-23 23:24:30 -050021 xmlns:tools="http://schemas.android.com/tools">
Adrien Béraud04d822c2015-04-02 17:44:36 -040022
Adrien Béraud86a1e372018-11-23 23:24:30 -050023 <data>
Adrien Béraud04d822c2015-04-02 17:44:36 -040024
Adrien Béraud86a1e372018-11-23 23:24:30 -050025 <variable
26 name="presenter"
27 type="cx.ring.fragments.CallFragment" />
28 </data>
Adrien Béraudfb6341f2016-03-07 16:18:54 -050029
Adrien Béraud86a1e372018-11-23 23:24:30 -050030 <FrameLayout
Adrien Béraudbc0898e2018-08-23 14:31:11 -040031 android:layout_width="match_parent"
32 android:layout_height="match_parent"
Adrien Béraud86a1e372018-11-23 23:24:30 -050033 android:keepScreenOn="true"
34 tools:context=".client.CallActivity">
Adrien Béraudbc0898e2018-08-23 14:31:11 -040035
Adrien Béraud86a1e372018-11-23 23:24:30 -050036 <RelativeLayout
Hadrien De Sousaccc947d2017-04-12 14:26:52 -040037 android:layout_width="match_parent"
Adrien Béraud86a1e372018-11-23 23:24:30 -050038 android:layout_height="match_parent">
Hadrien De Sousaccc947d2017-04-12 14:26:52 -040039
Adrien Béraud86a1e372018-11-23 23:24:30 -050040 <SurfaceView
41 android:id="@+id/video_surface"
Adrien Béraudbc0898e2018-08-23 14:31:11 -040042 android:layout_width="match_parent"
Adrien Béraud86a1e372018-11-23 23:24:30 -050043 android:layout_height="32dp"
44 android:layout_centerInParent="true"
45 android:layout_gravity="center"
Adrien Béraudbc0898e2018-08-23 14:31:11 -040046 android:visibility="gone"
Adrien Béraudbc0898e2018-08-23 14:31:11 -040047 tools:visibility="visible" />
48
Adrien Béraudde0d4522018-12-12 12:11:02 -050049 <androidx.cardview.widget.CardView
Adrien Béraud76dec1d2018-12-14 18:58:19 -050050 android:id="@+id/preview_container"
Adrien Béraudde0d4522018-12-12 12:11:02 -050051 android:layout_width="wrap_content"
52 android:layout_height="wrap_content"
Adrien Béraud86a1e372018-11-23 23:24:30 -050053 android:layout_alignParentEnd="true"
54 android:layout_alignParentBottom="true"
55 android:layout_margin="12dp"
Adrien Béraud77758402019-01-30 16:38:31 -050056 android:visibility="gone"
Adrien Béraudde0d4522018-12-12 12:11:02 -050057 app:cardCornerRadius="16dp"
Adrien Béraud77758402019-01-30 16:38:31 -050058 app:cardPreventCornerOverlap="false">
Adrien Béraudde0d4522018-12-12 12:11:02 -050059
60 <cx.ring.views.AutoFitTextureView
61 android:id="@+id/preview_surface"
62 android:layout_width="wrap_content"
63 android:layout_height="wrap_content"
64 android:visibility="visible"
65 tools:visibility="visible" />
66 </androidx.cardview.widget.CardView>
67
Adrien Béraud86a1e372018-11-23 23:24:30 -050068 </RelativeLayout>
69
70 <RelativeLayout
71 android:layout_width="match_parent"
72 android:layout_height="match_parent"
73 android:animateLayoutChanges="true"
74 android:clipToPadding="false"
75 android:fitsSystemWindows="true">
76
77 <LinearLayout
78 android:id="@+id/contact_bubble_layout"
Adrien Béraudbc0898e2018-08-23 14:31:11 -040079 android:layout_width="match_parent"
80 android:layout_height="wrap_content"
Adrien Béraud86a1e372018-11-23 23:24:30 -050081 android:layout_centerInParent="true"
82 android:gravity="center"
83 android:orientation="vertical"
84 android:visibility="invisible">
Adrien Béraudbc0898e2018-08-23 14:31:11 -040085
Adrien Béraud86a1e372018-11-23 23:24:30 -050086 <RelativeLayout
87 android:layout_width="match_parent"
88 android:layout_height="230dp">
Adrien Béraudbc0898e2018-08-23 14:31:11 -040089
Adrien Béraud86a1e372018-11-23 23:24:30 -050090 <com.rodolfonavalon.shaperipplelibrary.ShapeRipple
91 android:id="@+id/shape_ripple"
92 android:layout_width="match_parent"
93 android:layout_height="match_parent"
94 app:enable_color_transition="true"
95 app:ripple_color="@color/white"
96 app:ripple_count="3"
97 app:ripple_duration="5000"
98 app:ripple_stroke_width="15dp" />
99
100 <ImageView
101 android:id="@+id/contact_bubble"
102 android:layout_width="160dp"
103 android:layout_height="160dp"
104 android:layout_centerInParent="true"
105 tools:src="@drawable/ic_contact_picture_fallback" />
106 </RelativeLayout>
107
108 <TextView
109 android:id="@+id/contact_bubble_txt"
110 android:layout_width="match_parent"
111 android:layout_height="wrap_content"
112 android:ellipsize="middle"
113 android:gravity="center_horizontal"
114 android:paddingStart="32dp"
115 android:paddingEnd="32dp"
116 android:singleLine="true"
117 android:textAppearance="?android:attr/textAppearanceLarge"
118 android:textColor="@color/text_color_primary_dark"
119 tools:text="Contact Name" />
120
121 <TextView
122 android:id="@+id/contact_bubble_num_txt"
123 android:layout_width="match_parent"
124 android:layout_height="wrap_content"
125 android:ellipsize="middle"
126 android:gravity="center_horizontal"
127 android:paddingStart="32dp"
128 android:paddingEnd="32dp"
129 android:singleLine="true"
130 android:textAppearance="?android:attr/textAppearanceMedium"
131 android:textColor="@color/text_color_secondary_dark"
132 android:visibility="gone"
133 tools:text="ring:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
134 tools:visibility="visible" />
135
136 <TextView
137 android:id="@+id/call_status_txt"
138 android:layout_width="match_parent"
139 android:layout_height="wrap_content"
140 android:gravity="center_horizontal"
141 android:paddingStart="32dp"
142 android:paddingEnd="32dp"
143 android:textColor="@color/text_color_primary_dark"
144 android:textSize="16sp"
145 tools:text="Connecting" />
146 </LinearLayout>
147
148 <LinearLayout
Adrien Béraudbc0898e2018-08-23 14:31:11 -0400149 android:layout_width="wrap_content"
150 android:layout_height="wrap_content"
Adrien Béraud86a1e372018-11-23 23:24:30 -0500151 android:layout_below="@+id/contact_bubble_layout"
152 android:layout_centerHorizontal="true"
153 android:orientation="horizontal"
154 tools:visibility="gone">
155
156 <com.google.android.material.floatingactionbutton.FloatingActionButton
157 android:id="@+id/call_refuse_btn"
158 android:layout_width="wrap_content"
159 android:layout_height="wrap_content"
160 android:layout_margin="16dp"
161 android:contentDescription="@string/action_call_decline"
162 android:onClick="@{() -> presenter.refuseClicked()}"
Adrien Béraud77758402019-01-30 16:38:31 -0500163 android:tint="@color/white"
Rayan Osseiran292e23f2019-06-05 15:54:43 -0400164 android:visibility="gone"
Adrien Béraud86a1e372018-11-23 23:24:30 -0500165 app:backgroundTint="@color/error_red"
166 app:elevation="6dp"
167 app:fabSize="normal"
168 app:pressedTranslationZ="12dp"
169 app:rippleColor="@android:color/white"
Adrien Béraud77758402019-01-30 16:38:31 -0500170 app:srcCompat="@drawable/baseline_call_end_24"
Adrien Béraud86a1e372018-11-23 23:24:30 -0500171 app:useCompatPadding="true" />
172
173 <com.google.android.material.floatingactionbutton.FloatingActionButton
174 android:id="@+id/call_accept_btn"
175 android:layout_width="wrap_content"
176 android:layout_height="wrap_content"
177 android:layout_margin="16dp"
178 android:contentDescription="@string/action_call_accept"
179 android:onClick="@{() -> presenter.acceptClicked()}"
Rayan Osseiran292e23f2019-06-05 15:54:43 -0400180 android:visibility="gone"
Adrien Béraud86a1e372018-11-23 23:24:30 -0500181 app:backgroundTint="#4caf50"
182 app:elevation="6dp"
183 app:fabSize="normal"
184 app:pressedTranslationZ="12dp"
185 app:rippleColor="@android:color/white"
186 app:srcCompat="@drawable/ic_call_white"
187 app:useCompatPadding="true" />
188
189 </LinearLayout>
190
191 <LinearLayout
192 android:id="@+id/call_control_group"
193 android:layout_width="wrap_content"
194 android:layout_height="wrap_content"
195 android:layout_alignParentStart="true"
196 android:layout_alignParentBottom="true"
197 android:layout_marginStart="16dp"
198 android:layout_marginBottom="16dp"
199 android:gravity="center"
200 android:orientation="vertical"
201 android:visibility="gone"
202 tools:visibility="visible">
203
204 <ImageButton
205 android:id="@+id/call_camera_flip_btn"
206 android:layout_width="wrap_content"
207 android:layout_height="wrap_content"
208 android:layout_margin="12dp"
209 android:background="@drawable/call_button_background"
210 android:contentDescription="@string/ab_action_flipcamera"
211 android:onClick="@{() -> presenter.cameraFlip()}"
212 android:padding="16dp"
213 android:tint="@color/white"
214 app:srcCompat="@drawable/ic_camera_front_white" />
215
216 <cx.ring.views.CheckableImageButton
217 android:id="@+id/call_mic_btn"
218 android:layout_width="wrap_content"
219 android:layout_height="wrap_content"
220 android:layout_margin="12dp"
221 android:background="@drawable/call_button_background"
Adrien Béraudde0d4522018-12-12 12:11:02 -0500222 android:contentDescription="@string/action_call_mic_mute"
Adrien Béraud86a1e372018-11-23 23:24:30 -0500223 android:onClick="@{() -> presenter.micClicked()}"
224 android:padding="16dp"
225 android:tint="@color/white"
226 app:srcCompat="@drawable/baseline_mic_off_24"
227 tools:visibility="visible" />
228
229 <cx.ring.views.CheckableImageButton
230 android:id="@+id/call_speaker_btn"
231 android:layout_width="wrap_content"
232 android:layout_height="wrap_content"
233 android:layout_margin="12dp"
234 android:background="@drawable/call_button_background"
235 android:contentDescription="@string/ab_action_speakerphone"
236 android:onClick="@{() -> presenter.speakerClicked()}"
237 android:padding="16dp"
238 android:tint="@color/white"
239 app:srcCompat="@drawable/baseline_volume_up_24" />
240
241 </LinearLayout>
242
243 <EditText
244 android:id="@+id/dialpad_edit_text"
Adrien Béraudbcbb4d42018-12-08 16:06:39 -0500245 android:layout_width="1dp"
246 android:layout_height="1dp"
Adrien Béraud86a1e372018-11-23 23:24:30 -0500247 android:ems="10"
248 android:inputType="phone"
249 android:visibility="visible" />
250
251 <com.google.android.material.floatingactionbutton.FloatingActionButton
252 android:id="@+id/call_hangup_btn"
253 android:layout_width="wrap_content"
254 android:layout_height="wrap_content"
255 android:layout_alignParentBottom="true"
256 android:layout_centerHorizontal="true"
257 android:layout_marginBottom="4dp"
258 android:contentDescription="@string/action_call_hangup"
Adrien Béraudde0d4522018-12-12 12:11:02 -0500259 android:onClick="@{() -> presenter.hangUpClicked()}"
Adrien Béraud77758402019-01-30 16:38:31 -0500260 android:tint="@color/white"
Rayan Osseiran292e23f2019-06-05 15:54:43 -0400261 android:visibility="gone"
Adrien Béraudbc0898e2018-08-23 14:31:11 -0400262 app:backgroundTint="@color/error_red"
263 app:elevation="6dp"
264 app:fabSize="normal"
265 app:pressedTranslationZ="12dp"
266 app:rippleColor="@android:color/white"
Adrien Béraud77758402019-01-30 16:38:31 -0500267 app:srcCompat="@drawable/baseline_call_end_24"
Adrien Béraudbc0898e2018-08-23 14:31:11 -0400268 app:useCompatPadding="true" />
269
Adrien Béraud86a1e372018-11-23 23:24:30 -0500270 </RelativeLayout>
271 </FrameLayout>
272</layout>