blob: 3f65cd15ec689913f41ff8e2da62554762414b24 [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"
56 android:layout_margin="12dp"
Adrien Béraud77758402019-01-30 16:38:31 -050057 android:visibility="gone"
Adrien Béraudde0d4522018-12-12 12:11:02 -050058 app:cardCornerRadius="16dp"
Adrien Béraud77758402019-01-30 16:38:31 -050059 app:cardPreventCornerOverlap="false">
Adrien Béraudde0d4522018-12-12 12:11:02 -050060
61 <cx.ring.views.AutoFitTextureView
62 android:id="@+id/preview_surface"
63 android:layout_width="wrap_content"
64 android:layout_height="wrap_content"
65 android:visibility="visible"
66 tools:visibility="visible" />
67 </androidx.cardview.widget.CardView>
68
Adrien Béraud86a1e372018-11-23 23:24:30 -050069 </RelativeLayout>
70
71 <RelativeLayout
72 android:layout_width="match_parent"
73 android:layout_height="match_parent"
74 android:animateLayoutChanges="true"
75 android:clipToPadding="false"
76 android:fitsSystemWindows="true">
77
78 <LinearLayout
79 android:id="@+id/contact_bubble_layout"
Adrien Béraudbc0898e2018-08-23 14:31:11 -040080 android:layout_width="match_parent"
81 android:layout_height="wrap_content"
Adrien Béraud86a1e372018-11-23 23:24:30 -050082 android:layout_centerInParent="true"
83 android:gravity="center"
84 android:orientation="vertical"
85 android:visibility="invisible">
Adrien Béraudbc0898e2018-08-23 14:31:11 -040086
Adrien Béraud86a1e372018-11-23 23:24:30 -050087 <RelativeLayout
88 android:layout_width="match_parent"
89 android:layout_height="230dp">
Adrien Béraudbc0898e2018-08-23 14:31:11 -040090
Adrien Béraud86a1e372018-11-23 23:24:30 -050091 <com.rodolfonavalon.shaperipplelibrary.ShapeRipple
92 android:id="@+id/shape_ripple"
93 android:layout_width="match_parent"
94 android:layout_height="match_parent"
95 app:enable_color_transition="true"
96 app:ripple_color="@color/white"
97 app:ripple_count="3"
Adrien Béraudd6a98162019-10-21 12:35:25 -040098 app:ripple_duration="3000"
Adrien Béraud86a1e372018-11-23 23:24:30 -050099 app:ripple_stroke_width="15dp" />
100
101 <ImageView
102 android:id="@+id/contact_bubble"
103 android:layout_width="160dp"
104 android:layout_height="160dp"
105 android:layout_centerInParent="true"
106 tools:src="@drawable/ic_contact_picture_fallback" />
107 </RelativeLayout>
108
109 <TextView
110 android:id="@+id/contact_bubble_txt"
111 android:layout_width="match_parent"
112 android:layout_height="wrap_content"
113 android:ellipsize="middle"
114 android:gravity="center_horizontal"
115 android:paddingStart="32dp"
116 android:paddingEnd="32dp"
117 android:singleLine="true"
118 android:textAppearance="?android:attr/textAppearanceLarge"
119 android:textColor="@color/text_color_primary_dark"
120 tools:text="Contact Name" />
121
122 <TextView
123 android:id="@+id/contact_bubble_num_txt"
124 android:layout_width="match_parent"
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/textAppearanceMedium"
132 android:textColor="@color/text_color_secondary_dark"
133 android:visibility="gone"
134 tools:text="ring:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
135 tools:visibility="visible" />
136
137 <TextView
138 android:id="@+id/call_status_txt"
139 android:layout_width="match_parent"
140 android:layout_height="wrap_content"
141 android:gravity="center_horizontal"
142 android:paddingStart="32dp"
143 android:paddingEnd="32dp"
144 android:textColor="@color/text_color_primary_dark"
145 android:textSize="16sp"
146 tools:text="Connecting" />
147 </LinearLayout>
148
149 <LinearLayout
Adrien Béraudbc0898e2018-08-23 14:31:11 -0400150 android:layout_width="wrap_content"
151 android:layout_height="wrap_content"
Adrien Béraud86a1e372018-11-23 23:24:30 -0500152 android:layout_below="@+id/contact_bubble_layout"
153 android:layout_centerHorizontal="true"
154 android:orientation="horizontal"
155 tools:visibility="gone">
156
157 <com.google.android.material.floatingactionbutton.FloatingActionButton
158 android:id="@+id/call_refuse_btn"
159 android:layout_width="wrap_content"
160 android:layout_height="wrap_content"
161 android:layout_margin="16dp"
162 android:contentDescription="@string/action_call_decline"
163 android:onClick="@{() -> presenter.refuseClicked()}"
Adrien Béraud77758402019-01-30 16:38:31 -0500164 android:tint="@color/white"
Rayan Osseiran292e23f2019-06-05 15:54:43 -0400165 android:visibility="gone"
Adrien Béraud86a1e372018-11-23 23:24:30 -0500166 app:backgroundTint="@color/error_red"
167 app:elevation="6dp"
168 app:fabSize="normal"
169 app:pressedTranslationZ="12dp"
170 app:rippleColor="@android:color/white"
Adrien Béraud77758402019-01-30 16:38:31 -0500171 app:srcCompat="@drawable/baseline_call_end_24"
Adrien Béraud86a1e372018-11-23 23:24:30 -0500172 app:useCompatPadding="true" />
173
174 <com.google.android.material.floatingactionbutton.FloatingActionButton
175 android:id="@+id/call_accept_btn"
176 android:layout_width="wrap_content"
177 android:layout_height="wrap_content"
178 android:layout_margin="16dp"
179 android:contentDescription="@string/action_call_accept"
180 android:onClick="@{() -> presenter.acceptClicked()}"
Rayan Osseiran292e23f2019-06-05 15:54:43 -0400181 android:visibility="gone"
Adrien Béraud8d25e142019-09-25 13:23:19 -0400182 app:backgroundTint="@color/green_500"
Adrien Béraud86a1e372018-11-23 23:24:30 -0500183 app:elevation="6dp"
184 app:fabSize="normal"
185 app:pressedTranslationZ="12dp"
186 app:rippleColor="@android:color/white"
Adrien Béraud91f88742019-09-09 00:46:46 -0400187 app:srcCompat="@drawable/baseline_call_24"
Adrien Béraud86a1e372018-11-23 23:24:30 -0500188 app:useCompatPadding="true" />
189
190 </LinearLayout>
191
192 <LinearLayout
193 android:id="@+id/call_control_group"
194 android:layout_width="wrap_content"
195 android:layout_height="wrap_content"
196 android:layout_alignParentStart="true"
197 android:layout_alignParentBottom="true"
198 android:layout_marginStart="16dp"
199 android:layout_marginBottom="16dp"
200 android:gravity="center"
201 android:orientation="vertical"
202 android:visibility="gone"
203 tools:visibility="visible">
204
205 <ImageButton
206 android:id="@+id/call_camera_flip_btn"
207 android:layout_width="wrap_content"
208 android:layout_height="wrap_content"
209 android:layout_margin="12dp"
210 android:background="@drawable/call_button_background"
211 android:contentDescription="@string/ab_action_flipcamera"
212 android:onClick="@{() -> presenter.cameraFlip()}"
213 android:padding="16dp"
214 android:tint="@color/white"
Adrien Béraud91f88742019-09-09 00:46:46 -0400215 app:srcCompat="@drawable/baseline_camera_front_24" />
Adrien Béraud86a1e372018-11-23 23:24:30 -0500216
217 <cx.ring.views.CheckableImageButton
218 android:id="@+id/call_mic_btn"
219 android:layout_width="wrap_content"
220 android:layout_height="wrap_content"
221 android:layout_margin="12dp"
222 android:background="@drawable/call_button_background"
Adrien Béraudde0d4522018-12-12 12:11:02 -0500223 android:contentDescription="@string/action_call_mic_mute"
Adrien Béraud86a1e372018-11-23 23:24:30 -0500224 android:onClick="@{() -> presenter.micClicked()}"
225 android:padding="16dp"
226 android:tint="@color/white"
227 app:srcCompat="@drawable/baseline_mic_off_24"
228 tools:visibility="visible" />
229
230 <cx.ring.views.CheckableImageButton
231 android:id="@+id/call_speaker_btn"
232 android:layout_width="wrap_content"
233 android:layout_height="wrap_content"
234 android:layout_margin="12dp"
235 android:background="@drawable/call_button_background"
236 android:contentDescription="@string/ab_action_speakerphone"
237 android:onClick="@{() -> presenter.speakerClicked()}"
238 android:padding="16dp"
239 android:tint="@color/white"
240 app:srcCompat="@drawable/baseline_volume_up_24" />
241
242 </LinearLayout>
243
244 <EditText
245 android:id="@+id/dialpad_edit_text"
Adrien Béraudbcbb4d42018-12-08 16:06:39 -0500246 android:layout_width="1dp"
247 android:layout_height="1dp"
Adrien Béraud86a1e372018-11-23 23:24:30 -0500248 android:ems="10"
249 android:inputType="phone"
250 android:visibility="visible" />
251
252 <com.google.android.material.floatingactionbutton.FloatingActionButton
253 android:id="@+id/call_hangup_btn"
254 android:layout_width="wrap_content"
255 android:layout_height="wrap_content"
256 android:layout_alignParentBottom="true"
257 android:layout_centerHorizontal="true"
258 android:layout_marginBottom="4dp"
259 android:contentDescription="@string/action_call_hangup"
Adrien Béraudde0d4522018-12-12 12:11:02 -0500260 android:onClick="@{() -> presenter.hangUpClicked()}"
Adrien Béraud77758402019-01-30 16:38:31 -0500261 android:tint="@color/white"
Rayan Osseiran292e23f2019-06-05 15:54:43 -0400262 android:visibility="gone"
Adrien Béraudbc0898e2018-08-23 14:31:11 -0400263 app:backgroundTint="@color/error_red"
264 app:elevation="6dp"
265 app:fabSize="normal"
266 app:pressedTranslationZ="12dp"
267 app:rippleColor="@android:color/white"
Adrien Béraud77758402019-01-30 16:38:31 -0500268 app:srcCompat="@drawable/baseline_call_end_24"
Adrien Béraudbc0898e2018-08-23 14:31:11 -0400269 app:useCompatPadding="true" />
270
Adrien Béraud86a1e372018-11-23 23:24:30 -0500271 </RelativeLayout>
272 </FrameLayout>
273</layout>