blob: b8e3a9589eac284981e8e4e9e09abb213d9f6280 [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éraudd6a98162019-10-21 12:35:25 -040021 xmlns:tools="http://schemas.android.com/tools"
22 tools:context=".client.CallActivity">
Adrien Béraud04d822c2015-04-02 17:44:36 -040023
Adrien Béraud86a1e372018-11-23 23:24:30 -050024 <data>
Adrien Béraud04d822c2015-04-02 17:44:36 -040025
Adrien Béraud86a1e372018-11-23 23:24:30 -050026 <variable
27 name="presenter"
28 type="cx.ring.fragments.CallFragment" />
29 </data>
Adrien Béraudfb6341f2016-03-07 16:18:54 -050030
Adrien Béraud86a1e372018-11-23 23:24:30 -050031 <FrameLayout
Adrien Béraudbc0898e2018-08-23 14:31:11 -040032 android:layout_width="match_parent"
33 android:layout_height="match_parent"
Adrien Béraud86a1e372018-11-23 23:24:30 -050034 android:keepScreenOn="true"
Adrien Béraudd6a98162019-10-21 12:35:25 -040035 tools:background="@color/cardview_dark_background">
Adrien Béraudbc0898e2018-08-23 14:31:11 -040036
Adrien Béraud86a1e372018-11-23 23:24:30 -050037 <RelativeLayout
Hadrien De Sousaccc947d2017-04-12 14:26:52 -040038 android:layout_width="match_parent"
Adrien Béraud86a1e372018-11-23 23:24:30 -050039 android:layout_height="match_parent">
Hadrien De Sousaccc947d2017-04-12 14:26:52 -040040
Adrien Béraud86a1e372018-11-23 23:24:30 -050041 <SurfaceView
42 android:id="@+id/video_surface"
Adrien Béraudbc0898e2018-08-23 14:31:11 -040043 android:layout_width="match_parent"
Adrien Béraud86a1e372018-11-23 23:24:30 -050044 android:layout_height="32dp"
45 android:layout_centerInParent="true"
46 android:layout_gravity="center"
Adrien Béraudbc0898e2018-08-23 14:31:11 -040047 android:visibility="gone"
Adrien Béraudbc0898e2018-08-23 14:31:11 -040048 tools:visibility="visible" />
49
Adrien Béraudde0d4522018-12-12 12:11:02 -050050 <androidx.cardview.widget.CardView
Adrien Béraud76dec1d2018-12-14 18:58:19 -050051 android:id="@+id/preview_container"
Adrien Béraudde0d4522018-12-12 12:11:02 -050052 android:layout_width="wrap_content"
53 android:layout_height="wrap_content"
Adrien Béraud86a1e372018-11-23 23:24:30 -050054 android:layout_alignParentEnd="true"
55 android:layout_alignParentBottom="true"
Adrien Béraude4f901a2019-10-25 17:26:30 -040056 android:layout_marginStart="12dp"
57 android:layout_marginTop="12dp"
58 android:layout_marginEnd="12dp"
59 android:layout_marginBottom="12dp"
Adrien Béraud77758402019-01-30 16:38:31 -050060 android:visibility="gone"
Adrien Béraudde0d4522018-12-12 12:11:02 -050061 app:cardCornerRadius="16dp"
Adrien Béraude4f901a2019-10-25 17:26:30 -040062 app:cardPreventCornerOverlap="false"
63 tools:visibility="visible">
Adrien Béraudde0d4522018-12-12 12:11:02 -050064
65 <cx.ring.views.AutoFitTextureView
66 android:id="@+id/preview_surface"
67 android:layout_width="wrap_content"
68 android:layout_height="wrap_content"
69 android:visibility="visible"
70 tools:visibility="visible" />
71 </androidx.cardview.widget.CardView>
72
Adrien Béraud86a1e372018-11-23 23:24:30 -050073 </RelativeLayout>
74
75 <RelativeLayout
76 android:layout_width="match_parent"
77 android:layout_height="match_parent"
78 android:animateLayoutChanges="true"
79 android:clipToPadding="false"
80 android:fitsSystemWindows="true">
81
Adrien Béraude4f901a2019-10-25 17:26:30 -040082 <com.google.android.flexbox.FlexboxLayout
Adrien Béraud86a1e372018-11-23 23:24:30 -050083 android:id="@+id/contact_bubble_layout"
Adrien Béraude4f901a2019-10-25 17:26:30 -040084 android:layout_width="wrap_content"
Adrien Béraudbc0898e2018-08-23 14:31:11 -040085 android:layout_height="wrap_content"
Adrien Béraud86a1e372018-11-23 23:24:30 -050086 android:layout_centerInParent="true"
Adrien Béraud86a1e372018-11-23 23:24:30 -050087 android:orientation="vertical"
Adrien Béraude4f901a2019-10-25 17:26:30 -040088 android:visibility="visible"
89 app:flexDirection="column"
90 app:flexWrap="wrap"
Adrien Béraud787018c2019-10-25 17:28:19 -040091 tools:visibility="visible">
Adrien Béraudbc0898e2018-08-23 14:31:11 -040092
Adrien Béraud86a1e372018-11-23 23:24:30 -050093 <RelativeLayout
Adrien Béraude4f901a2019-10-25 17:26:30 -040094 android:layout_width="230dp"
Adrien Béraud86a1e372018-11-23 23:24:30 -050095 android:layout_height="230dp">
Adrien Béraudbc0898e2018-08-23 14:31:11 -040096
Adrien Béraud86a1e372018-11-23 23:24:30 -050097 <com.rodolfonavalon.shaperipplelibrary.ShapeRipple
98 android:id="@+id/shape_ripple"
Adrien Béraude4f901a2019-10-25 17:26:30 -040099 android:layout_width="wrap_content"
Adrien Béraud86a1e372018-11-23 23:24:30 -0500100 android:layout_height="match_parent"
Adrien Béraude4f901a2019-10-25 17:26:30 -0400101 android:layout_centerInParent="true"
Adrien Béraud86a1e372018-11-23 23:24:30 -0500102 app:enable_color_transition="true"
103 app:ripple_color="@color/white"
104 app:ripple_count="3"
Adrien Béraudd6a98162019-10-21 12:35:25 -0400105 app:ripple_duration="3000"
Adrien Béraud86a1e372018-11-23 23:24:30 -0500106 app:ripple_stroke_width="15dp" />
107
108 <ImageView
109 android:id="@+id/contact_bubble"
110 android:layout_width="160dp"
111 android:layout_height="160dp"
112 android:layout_centerInParent="true"
113 tools:src="@drawable/ic_contact_picture_fallback" />
114 </RelativeLayout>
115
Adrien Béraude4f901a2019-10-25 17:26:30 -0400116 <LinearLayout
Adrien Béraud86a1e372018-11-23 23:24:30 -0500117 android:layout_width="wrap_content"
118 android:layout_height="wrap_content"
Adrien Béraude4f901a2019-10-25 17:26:30 -0400119 android:gravity="center_horizontal"
120 android:orientation="vertical">
Adrien Béraud86a1e372018-11-23 23:24:30 -0500121
Adrien Béraude4f901a2019-10-25 17:26:30 -0400122 <TextView
123 android:id="@+id/contact_bubble_txt"
124 android:layout_width="wrap_content"
125 android:layout_height="wrap_content"
126 android:ellipsize="middle"
127 android:gravity="center_horizontal"
128 android:paddingStart="32dp"
129 android:paddingEnd="32dp"
130 android:singleLine="true"
131 android:textAppearance="?android:attr/textAppearanceLarge"
Adrien Béraude4f901a2019-10-25 17:26:30 -0400132 tools:text="Contact Name" />
Adrien Béraud86a1e372018-11-23 23:24:30 -0500133
Adrien Béraude4f901a2019-10-25 17:26:30 -0400134 <TextView
135 android:id="@+id/contact_bubble_num_txt"
136 android:layout_width="wrap_content"
137 android:layout_height="wrap_content"
138 android:ellipsize="middle"
139 android:gravity="center_horizontal"
140 android:paddingStart="32dp"
141 android:paddingEnd="32dp"
142 android:singleLine="true"
143 android:textAppearance="?android:attr/textAppearanceMedium"
Adrien Béraude4f901a2019-10-25 17:26:30 -0400144 android:visibility="gone"
145 tools:text="ring:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
146 tools:visibility="visible" />
Adrien Béraud86a1e372018-11-23 23:24:30 -0500147
Adrien Béraude4f901a2019-10-25 17:26:30 -0400148 <TextView
149 android:id="@+id/call_status_txt"
150 android:layout_width="wrap_content"
151 android:layout_height="wrap_content"
152 android:gravity="center_horizontal"
153 android:paddingStart="32dp"
154 android:paddingEnd="32dp"
Adrien Béraude4f901a2019-10-25 17:26:30 -0400155 android:textSize="16sp"
156 tools:text="Connecting" />
157
158 <LinearLayout
159 android:layout_width="wrap_content"
160 android:layout_height="wrap_content"
161 android:orientation="horizontal"
162 tools:visibility="visible">
163
164 <com.google.android.material.floatingactionbutton.FloatingActionButton
165 android:id="@+id/call_refuse_btn"
166 android:layout_width="wrap_content"
167 android:layout_height="wrap_content"
168 android:layout_margin="16dp"
169 android:contentDescription="@string/action_call_decline"
170 android:onClick="@{() -> presenter.refuseClicked()}"
171 android:tint="@color/white"
172 android:visibility="visible"
173 app:backgroundTint="@color/error_red"
174 app:elevation="6dp"
175 app:fabSize="normal"
176 app:pressedTranslationZ="12dp"
177 app:rippleColor="@android:color/white"
178 app:srcCompat="@drawable/baseline_call_end_24"
179 app:useCompatPadding="true" />
180
181 <com.google.android.material.floatingactionbutton.FloatingActionButton
182 android:id="@+id/call_accept_btn"
183 android:layout_width="wrap_content"
184 android:layout_height="wrap_content"
185 android:layout_margin="16dp"
186 android:contentDescription="@string/action_call_accept"
187 android:onClick="@{() -> presenter.acceptClicked()}"
188 android:visibility="visible"
189 app:backgroundTint="@color/green_500"
190 app:elevation="6dp"
191 app:fabSize="normal"
192 app:pressedTranslationZ="12dp"
193 app:rippleColor="@android:color/white"
194 app:srcCompat="@drawable/baseline_call_24"
195 app:useCompatPadding="true" />
196 </LinearLayout>
197
198 </LinearLayout>
199 </com.google.android.flexbox.FlexboxLayout>
200
201 <com.google.android.flexbox.FlexboxLayout
Adrien Béraud86a1e372018-11-23 23:24:30 -0500202 android:id="@+id/call_control_group"
203 android:layout_width="wrap_content"
204 android:layout_height="wrap_content"
205 android:layout_alignParentStart="true"
206 android:layout_alignParentBottom="true"
207 android:layout_marginStart="16dp"
208 android:layout_marginBottom="16dp"
209 android:gravity="center"
210 android:orientation="vertical"
211 android:visibility="gone"
Adrien Béraude4f901a2019-10-25 17:26:30 -0400212 app:flexDirection="column_reverse"
213 app:flexWrap="wrap"
Adrien Béraud86a1e372018-11-23 23:24:30 -0500214 tools:visibility="visible">
215
216 <ImageButton
217 android:id="@+id/call_camera_flip_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"
222 android:contentDescription="@string/ab_action_flipcamera"
223 android:onClick="@{() -> presenter.cameraFlip()}"
224 android:padding="16dp"
225 android:tint="@color/white"
Adrien Béraud91f88742019-09-09 00:46:46 -0400226 app:srcCompat="@drawable/baseline_camera_front_24" />
Adrien Béraud86a1e372018-11-23 23:24:30 -0500227
Adrien Béraude4f901a2019-10-25 17:26:30 -0400228 <ImageButton
229 android:id="@+id/call_conference_add"
230 android:layout_width="wrap_content"
231 android:layout_height="wrap_content"
232 android:layout_margin="12dp"
233 android:background="@drawable/call_button_background"
234 android:onClick="@{() -> presenter.addParticipant()}"
235 android:padding="16dp"
236 android:tint="@color/white"
237 app:srcCompat="@drawable/baseline_person_add_24" />
238
Adrien Béraud86a1e372018-11-23 23:24:30 -0500239 <cx.ring.views.CheckableImageButton
240 android:id="@+id/call_mic_btn"
241 android:layout_width="wrap_content"
242 android:layout_height="wrap_content"
243 android:layout_margin="12dp"
244 android:background="@drawable/call_button_background"
Adrien Béraudde0d4522018-12-12 12:11:02 -0500245 android:contentDescription="@string/action_call_mic_mute"
Adrien Béraud86a1e372018-11-23 23:24:30 -0500246 android:onClick="@{() -> presenter.micClicked()}"
247 android:padding="16dp"
248 android:tint="@color/white"
249 app:srcCompat="@drawable/baseline_mic_off_24"
250 tools:visibility="visible" />
251
252 <cx.ring.views.CheckableImageButton
253 android:id="@+id/call_speaker_btn"
254 android:layout_width="wrap_content"
255 android:layout_height="wrap_content"
256 android:layout_margin="12dp"
257 android:background="@drawable/call_button_background"
258 android:contentDescription="@string/ab_action_speakerphone"
259 android:onClick="@{() -> presenter.speakerClicked()}"
260 android:padding="16dp"
261 android:tint="@color/white"
262 app:srcCompat="@drawable/baseline_volume_up_24" />
263
Adrien Béraudade9bee2019-12-02 17:13:26 -0500264 <cx.ring.views.CheckableImageButton
265 android:id="@+id/call_screenshare_btn"
266 android:layout_width="wrap_content"
267 android:layout_height="wrap_content"
268 android:layout_margin="12dp"
269 android:background="@drawable/call_button_background"
270 android:contentDescription="@string/ab_action_speakerphone"
271 android:onClick="@{(v) -> presenter.shareScreenClicked(((android.widget.Checkable)v).isChecked())}"
272 android:padding="16dp"
273 android:tint="@color/white"
274 app:srcCompat="@drawable/baseline_mobile_screen_share_24" />
275
Adrien Béraude4f901a2019-10-25 17:26:30 -0400276 </com.google.android.flexbox.FlexboxLayout>
277
278 <androidx.recyclerview.widget.RecyclerView
279 android:layout_width="wrap_content"
280 android:layout_height="wrap_content"
281 android:id="@+id/conf_control_group"
282 android:layout_alignParentEnd="true"
283 android:layout_alignParentTop="true"
284 app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
285 tools:listitem="@layout/item_conference_participant"
286 tools:itemCount="4" />
Adrien Béraud86a1e372018-11-23 23:24:30 -0500287
288 <EditText
289 android:id="@+id/dialpad_edit_text"
Adrien Béraudbcbb4d42018-12-08 16:06:39 -0500290 android:layout_width="1dp"
291 android:layout_height="1dp"
Adrien Béraud86a1e372018-11-23 23:24:30 -0500292 android:ems="10"
293 android:inputType="phone"
294 android:visibility="visible" />
295
296 <com.google.android.material.floatingactionbutton.FloatingActionButton
297 android:id="@+id/call_hangup_btn"
298 android:layout_width="wrap_content"
299 android:layout_height="wrap_content"
300 android:layout_alignParentBottom="true"
301 android:layout_centerHorizontal="true"
302 android:layout_marginBottom="4dp"
303 android:contentDescription="@string/action_call_hangup"
Adrien Béraudde0d4522018-12-12 12:11:02 -0500304 android:onClick="@{() -> presenter.hangUpClicked()}"
Adrien Béraud77758402019-01-30 16:38:31 -0500305 android:tint="@color/white"
Rayan Osseiran292e23f2019-06-05 15:54:43 -0400306 android:visibility="gone"
Adrien Béraudbc0898e2018-08-23 14:31:11 -0400307 app:backgroundTint="@color/error_red"
308 app:elevation="6dp"
309 app:fabSize="normal"
310 app:pressedTranslationZ="12dp"
311 app:rippleColor="@android:color/white"
Adrien Béraud77758402019-01-30 16:38:31 -0500312 app:srcCompat="@drawable/baseline_call_end_24"
Adrien Béraudbc0898e2018-08-23 14:31:11 -0400313 app:useCompatPadding="true" />
314
Adrien Béraud86a1e372018-11-23 23:24:30 -0500315 </RelativeLayout>
316 </FrameLayout>
317</layout>