1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2018 The Android Open Source Project
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7
8          http://www.apache.org/licenses/LICENSE-2.0
9
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15-->
16<RelativeLayout
17  xmlns:android="http://schemas.android.com/apk/res/android"
18  xmlns:app="http://schemas.android.com/apk/res-auto"
19  xmlns:tools="http://schemas.android.com/tools"
20  android:id="@+id/videocall_video_controls_container"
21  android:fitsSystemWindows="true"
22  android:layout_width="match_parent"
23  android:layout_height="match_parent"
24  android:orientation="vertical">
25
26  <include
27    android:id="@+id/incall_contact_grid"
28    layout="@layout/video_contact_grid"
29    android:layout_width="match_parent"
30    android:layout_height="wrap_content"
31    android:layout_marginTop="16dp"
32    android:layout_marginStart="24dp"
33    android:layout_marginEnd="24dp"/>
34
35  <!-- This placeholder matches the position of the preview UI and is used to
36     anchor video buttons. This is needed in greenscreen mode when the
37     preview is fullscreen but we want the controls to be positioned as
38     normal.  -->
39  <Space
40    android:id="@+id/videocall_video_preview_placeholder"
41    android:layout_width="@dimen/videocall_preview_width"
42    android:layout_height="@dimen/videocall_preview_height"
43    android:layout_marginEnd="@dimen/videocall_preview_margin_end"
44    android:layout_alignParentBottom="true"
45    android:layout_alignParentEnd="true"
46    android:visibility="invisible"/>
47
48  <LinearLayout
49    android:id="@+id/videocall_video_controls"
50    android:layout_width="wrap_content"
51    android:layout_height="wrap_content"
52    android:layout_alignBottom="@+id/videocall_video_preview_placeholder"
53    android:layout_alignTop="@+id/videocall_video_preview_placeholder"
54    android:layout_toStartOf="@+id/videocall_video_preview_placeholder"
55    android:gravity="center_horizontal"
56    android:orientation="horizontal"
57    android:visibility="invisible"
58    tools:visibility="visible">
59    <com.android.incallui.video.impl.CheckableImageButton
60      android:id="@+id/videocall_speaker_button"
61      style="@style/Incall.Button.VideoCall"
62      android:layout_marginEnd="24dp"
63      android:checked="true"
64      android:src="@drawable/quantum_ic_volume_up_vd_theme_24"
65      app:contentDescriptionChecked="@string/incall_content_description_speaker"
66      app:contentDescriptionUnchecked="@string/incall_content_description_earpiece"
67      />
68    <com.android.incallui.video.impl.CheckableImageButton
69      android:id="@+id/videocall_mute_button"
70      style="@style/Incall.Button.VideoCall"
71      android:layout_marginEnd="24dp"
72      android:src="@drawable/quantum_ic_mic_off_vd_theme_24"
73      app:contentDescriptionChecked="@string/incall_content_description_muted"
74      app:contentDescriptionUnchecked="@string/incall_content_description_unmuted"
75      />
76    <com.android.incallui.video.impl.CheckableImageButton
77      android:id="@+id/videocall_mute_video"
78      style="@style/Incall.Button.VideoCall"
79      android:layout_marginEnd="24dp"
80      android:src="@drawable/quantum_ic_videocam_off_vd_theme_24"
81      app:contentDescriptionChecked="@string/incall_content_description_video_off"
82      app:contentDescriptionUnchecked="@string/incall_content_description_video_on"
83      />
84    <include
85      layout="@layout/switch_camera_button"
86      android:layout_width="@dimen/videocall_button_size"
87      android:layout_height="@dimen/videocall_button_size"
88      android:layout_marginEnd="24dp"/>
89  </LinearLayout>
90
91  <FrameLayout
92    android:id="@+id/videocall_switch_controls"
93    android:layout_width="wrap_content"
94    android:layout_height="wrap_content"
95    android:layout_marginTop="36dp"
96    android:layout_marginEnd="36dp"
97    android:layout_alignParentEnd="true"
98    android:layout_alignParentTop="true">
99    <ImageButton
100      android:id="@+id/videocall_switch_on_hold"
101      style="@style/Incall.Button.VideoCall"
102      android:contentDescription="@string/incall_content_description_swap_calls"
103      android:src="@drawable/quantum_ic_swap_calls_vd_theme_24"
104      android:visibility="gone"
105      tools:visibility="visible"
106      />
107  </FrameLayout>
108
109  <ImageButton
110    android:id="@+id/videocall_end_call"
111    style="@style/Incall.Button.End"
112    android:layout_marginEnd="36dp"
113    android:layout_alignParentEnd="true"
114    android:layout_centerVertical="true"
115    android:contentDescription="@string/incall_content_description_end_call"
116    android:visibility="visible"
117    tools:visibility="visible"/>
118
119</RelativeLayout>
120