blob: beebdd0ae1b263aa28ec3315cd9322b3b48693cd [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
50 android:layout_width="wrap_content"
51 android:layout_height="wrap_content"
Adrien Béraud86a1e372018-11-23 23:24:30 -050052 android:layout_alignParentEnd="true"
53 android:layout_alignParentBottom="true"
54 android:layout_margin="12dp"
Adrien Béraudde0d4522018-12-12 12:11:02 -050055 app:cardCornerRadius="16dp"
56 app:cardPreventCornerOverlap="false">
57
58 <cx.ring.views.AutoFitTextureView
59 android:id="@+id/preview_surface"
60 android:layout_width="wrap_content"
61 android:layout_height="wrap_content"
62 android:visibility="visible"
63 tools:visibility="visible" />
64 </androidx.cardview.widget.CardView>
65
Adrien Béraud86a1e372018-11-23 23:24:30 -050066 </RelativeLayout>
67
68 <RelativeLayout
69 android:layout_width="match_parent"
70 android:layout_height="match_parent"
71 android:animateLayoutChanges="true"
72 android:clipToPadding="false"
73 android:fitsSystemWindows="true">
74
75 <LinearLayout
76 android:id="@+id/contact_bubble_layout"
Adrien Béraudbc0898e2018-08-23 14:31:11 -040077 android:layout_width="match_parent"
78 android:layout_height="wrap_content"
Adrien Béraud86a1e372018-11-23 23:24:30 -050079 android:layout_centerInParent="true"
80 android:gravity="center"
81 android:orientation="vertical"
82 android:visibility="invisible">
Adrien Béraudbc0898e2018-08-23 14:31:11 -040083
Adrien Béraud86a1e372018-11-23 23:24:30 -050084 <RelativeLayout
85 android:layout_width="match_parent"
86 android:layout_height="230dp">
Adrien Béraudbc0898e2018-08-23 14:31:11 -040087
Adrien Béraud86a1e372018-11-23 23:24:30 -050088 <com.rodolfonavalon.shaperipplelibrary.ShapeRipple
89 android:id="@+id/shape_ripple"
90 android:layout_width="match_parent"
91 android:layout_height="match_parent"
92 app:enable_color_transition="true"
93 app:ripple_color="@color/white"
94 app:ripple_count="3"
95 app:ripple_duration="5000"
96 app:ripple_stroke_width="15dp" />
97
98 <ImageView
99 android:id="@+id/contact_bubble"
100 android:layout_width="160dp"
101 android:layout_height="160dp"
102 android:layout_centerInParent="true"
103 tools:src="@drawable/ic_contact_picture_fallback" />
104 </RelativeLayout>
105
106 <TextView
107 android:id="@+id/contact_bubble_txt"
108 android:layout_width="match_parent"
109 android:layout_height="wrap_content"
110 android:ellipsize="middle"
111 android:gravity="center_horizontal"
112 android:paddingStart="32dp"
113 android:paddingEnd="32dp"
114 android:singleLine="true"
115 android:textAppearance="?android:attr/textAppearanceLarge"
116 android:textColor="@color/text_color_primary_dark"
117 tools:text="Contact Name" />
118
119 <TextView
120 android:id="@+id/contact_bubble_num_txt"
121 android:layout_width="match_parent"
122 android:layout_height="wrap_content"
123 android:ellipsize="middle"
124 android:gravity="center_horizontal"
125 android:paddingStart="32dp"
126 android:paddingEnd="32dp"
127 android:singleLine="true"
128 android:textAppearance="?android:attr/textAppearanceMedium"
129 android:textColor="@color/text_color_secondary_dark"
130 android:visibility="gone"
131 tools:text="ring:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
132 tools:visibility="visible" />
133
134 <TextView
135 android:id="@+id/call_status_txt"
136 android:layout_width="match_parent"
137 android:layout_height="wrap_content"
138 android:gravity="center_horizontal"
139 android:paddingStart="32dp"
140 android:paddingEnd="32dp"
141 android:textColor="@color/text_color_primary_dark"
142 android:textSize="16sp"
143 tools:text="Connecting" />
144 </LinearLayout>
145
146 <LinearLayout
Adrien Béraudbc0898e2018-08-23 14:31:11 -0400147 android:layout_width="wrap_content"
148 android:layout_height="wrap_content"
Adrien Béraud86a1e372018-11-23 23:24:30 -0500149 android:layout_below="@+id/contact_bubble_layout"
150 android:layout_centerHorizontal="true"
151 android:orientation="horizontal"
152 tools:visibility="gone">
153
154 <com.google.android.material.floatingactionbutton.FloatingActionButton
155 android:id="@+id/call_refuse_btn"
156 android:layout_width="wrap_content"
157 android:layout_height="wrap_content"
158 android:layout_margin="16dp"
159 android:contentDescription="@string/action_call_decline"
160 android:onClick="@{() -> presenter.refuseClicked()}"
161 app:backgroundTint="@color/error_red"
162 app:elevation="6dp"
163 app:fabSize="normal"
164 app:pressedTranslationZ="12dp"
165 app:rippleColor="@android:color/white"
166 app:srcCompat="@drawable/ic_call_end_white"
167 app:useCompatPadding="true" />
168
169 <com.google.android.material.floatingactionbutton.FloatingActionButton
170 android:id="@+id/call_accept_btn"
171 android:layout_width="wrap_content"
172 android:layout_height="wrap_content"
173 android:layout_margin="16dp"
174 android:contentDescription="@string/action_call_accept"
175 android:onClick="@{() -> presenter.acceptClicked()}"
176 app:backgroundTint="#4caf50"
177 app:elevation="6dp"
178 app:fabSize="normal"
179 app:pressedTranslationZ="12dp"
180 app:rippleColor="@android:color/white"
181 app:srcCompat="@drawable/ic_call_white"
182 app:useCompatPadding="true" />
183
184 </LinearLayout>
185
186 <LinearLayout
187 android:id="@+id/call_control_group"
188 android:layout_width="wrap_content"
189 android:layout_height="wrap_content"
190 android:layout_alignParentStart="true"
191 android:layout_alignParentBottom="true"
192 android:layout_marginStart="16dp"
193 android:layout_marginBottom="16dp"
194 android:gravity="center"
195 android:orientation="vertical"
196 android:visibility="gone"
197 tools:visibility="visible">
198
199 <ImageButton
200 android:id="@+id/call_camera_flip_btn"
201 android:layout_width="wrap_content"
202 android:layout_height="wrap_content"
203 android:layout_margin="12dp"
204 android:background="@drawable/call_button_background"
205 android:contentDescription="@string/ab_action_flipcamera"
206 android:onClick="@{() -> presenter.cameraFlip()}"
207 android:padding="16dp"
208 android:tint="@color/white"
209 app:srcCompat="@drawable/ic_camera_front_white" />
210
211 <cx.ring.views.CheckableImageButton
212 android:id="@+id/call_mic_btn"
213 android:layout_width="wrap_content"
214 android:layout_height="wrap_content"
215 android:layout_margin="12dp"
216 android:background="@drawable/call_button_background"
Adrien Béraudde0d4522018-12-12 12:11:02 -0500217 android:contentDescription="@string/action_call_mic_mute"
Adrien Béraud86a1e372018-11-23 23:24:30 -0500218 android:onClick="@{() -> presenter.micClicked()}"
219 android:padding="16dp"
220 android:tint="@color/white"
221 app:srcCompat="@drawable/baseline_mic_off_24"
222 tools:visibility="visible" />
223
224 <cx.ring.views.CheckableImageButton
225 android:id="@+id/call_speaker_btn"
226 android:layout_width="wrap_content"
227 android:layout_height="wrap_content"
228 android:layout_margin="12dp"
229 android:background="@drawable/call_button_background"
230 android:contentDescription="@string/ab_action_speakerphone"
231 android:onClick="@{() -> presenter.speakerClicked()}"
232 android:padding="16dp"
233 android:tint="@color/white"
234 app:srcCompat="@drawable/baseline_volume_up_24" />
235
236 </LinearLayout>
237
238 <EditText
239 android:id="@+id/dialpad_edit_text"
Adrien Béraudbcbb4d42018-12-08 16:06:39 -0500240 android:layout_width="1dp"
241 android:layout_height="1dp"
Adrien Béraud86a1e372018-11-23 23:24:30 -0500242 android:ems="10"
243 android:inputType="phone"
244 android:visibility="visible" />
245
246 <com.google.android.material.floatingactionbutton.FloatingActionButton
247 android:id="@+id/call_hangup_btn"
248 android:layout_width="wrap_content"
249 android:layout_height="wrap_content"
250 android:layout_alignParentBottom="true"
251 android:layout_centerHorizontal="true"
252 android:layout_marginBottom="4dp"
253 android:contentDescription="@string/action_call_hangup"
Adrien Béraudde0d4522018-12-12 12:11:02 -0500254 android:onClick="@{() -> presenter.hangUpClicked()}"
Adrien Béraudbc0898e2018-08-23 14:31:11 -0400255 app:backgroundTint="@color/error_red"
256 app:elevation="6dp"
257 app:fabSize="normal"
258 app:pressedTranslationZ="12dp"
259 app:rippleColor="@android:color/white"
260 app:srcCompat="@drawable/ic_call_end_white"
261 app:useCompatPadding="true" />
262
Adrien Béraud86a1e372018-11-23 23:24:30 -0500263 </RelativeLayout>
264 </FrameLayout>
265</layout>