activity_rtp_session.xml

  1<?xml version="1.0" encoding="utf-8"?>
  2<layout xmlns:android="http://schemas.android.com/apk/res/android"
  3    xmlns:app="http://schemas.android.com/apk/res-auto"
  4    xmlns:tools="http://schemas.android.com/tools">
  5
  6    <RelativeLayout
  7        android:layout_width="match_parent"
  8        android:layout_height="match_parent"
  9        android:background="?color_background_secondary">
 10
 11        <LinearLayout
 12            android:id="@+id/pip_placeholder"
 13            android:layout_width="match_parent"
 14            android:layout_height="match_parent"
 15            android:background="@color/black"
 16            android:gravity="center"
 17            android:orientation="horizontal"
 18            android:visibility="gone">
 19
 20            <ProgressBar
 21                android:id="@+id/pip_waiting"
 22                android:layout_width="wrap_content"
 23                android:layout_height="wrap_content"
 24                android:indeterminate="true"
 25                android:indeterminateOnly="true"
 26                android:indeterminateTint="@color/white"
 27                android:visibility="gone" />
 28
 29            <ImageView
 30                android:id="@+id/pip_warning"
 31                android:layout_width="wrap_content"
 32                android:layout_height="wrap_content"
 33                android:src="@drawable/ic_warning_white_48dp"
 34                android:visibility="gone" />
 35        </LinearLayout>
 36
 37        <com.google.android.material.appbar.AppBarLayout
 38            android:id="@+id/app_bar_layout"
 39            android:layout_width="match_parent"
 40            android:layout_height="wrap_content"
 41            android:visibility="visible">
 42
 43            <androidx.appcompat.widget.Toolbar
 44                android:id="@+id/toolbar"
 45                android:layout_width="match_parent"
 46                android:layout_height="?attr/actionBarSize"
 47                android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
 48                app:popupTheme="?popupOverlayStyle" />
 49
 50            <TextView
 51                android:id="@+id/with"
 52                android:layout_width="wrap_content"
 53                android:layout_height="wrap_content"
 54                android:layout_below="@id/status"
 55                android:layout_marginLeft="16dp"
 56                android:layout_marginTop="0dp"
 57                android:layout_marginRight="16dp"
 58                android:layout_marginBottom="16dp"
 59                android:textAppearance="@style/TextAppearance.Conversations.Display2"
 60                android:textColor="@color/white"
 61                tools:text="Juliet Capulet" />
 62
 63            <TextView
 64                android:id="@+id/with_jid"
 65                android:layout_width="wrap_content"
 66                android:layout_height="wrap_content"
 67                android:layout_below="@id/with"
 68                android:layout_marginLeft="16dp"
 69                android:layout_marginTop="0dp"
 70                android:layout_marginRight="16dp"
 71                android:layout_marginBottom="32dp"
 72                android:textAppearance="@style/TextAppearance.Conversations.Title"
 73                android:textColor="@color/white"
 74                tools:text="juliet@capulet.lit" />
 75
 76        </com.google.android.material.appbar.AppBarLayout>
 77
 78        <RelativeLayout
 79            android:layout_width="match_parent"
 80            android:layout_height="wrap_content"
 81            android:layout_above="@+id/button_row"
 82            android:layout_below="@id/app_bar_layout">
 83
 84            <TextView
 85                android:id="@+id/duration"
 86                android:layout_width="wrap_content"
 87                android:layout_height="wrap_content"
 88                android:layout_centerHorizontal="true"
 89                android:layout_marginTop="@dimen/rtp_session_duration_top_margin"
 90                android:textAppearance="@style/TextAppearance.Conversations.Title.Monospace"
 91                tools:text="01:23" />
 92
 93            <com.makeramen.roundedimageview.RoundedImageView
 94                android:id="@+id/contact_photo"
 95                android:layout_width="@dimen/publish_avatar_size"
 96                android:layout_height="@dimen/publish_avatar_size"
 97                android:layout_centerInParent="true"
 98                app:riv_corner_radius="@dimen/incoming_call_radius" />
 99
100        </RelativeLayout>
101
102        <org.webrtc.SurfaceViewRenderer
103            android:id="@+id/local_video"
104            android:layout_width="@dimen/local_video_preview_width"
105            android:layout_height="@dimen/local_video_preview_height"
106            android:layout_below="@+id/app_bar_layout"
107            android:layout_alignParentEnd="true"
108            android:layout_marginTop="24dp"
109            android:layout_marginEnd="24dp"
110            android:visibility="gone"
111            app:elevation="4dp" />
112
113        <org.webrtc.SurfaceViewRenderer
114            android:id="@+id/remote_video"
115            android:layout_width="match_parent"
116            android:layout_height="match_parent"
117            android:layout_below="@+id/app_bar_layout"
118            android:layout_alignParentStart="true"
119            android:layout_alignParentBottom="true"
120            android:visibility="gone" />
121
122        <ImageView
123            android:id="@+id/verified"
124            android:layout_width="wrap_content"
125            android:layout_height="wrap_content"
126            android:layout_below="@+id/app_bar_layout"
127            android:layout_alignParentStart="true"
128            android:layout_marginStart="16dp"
129            android:layout_marginTop="@dimen/rtp_session_duration_top_margin"
130            android:alpha="0.7"
131            android:src="@drawable/ic_verified_fingerprint" />
132
133        <ImageView
134            android:id="@+id/pip_local_mic_off_indicator"
135            android:layout_width="wrap_content"
136            android:layout_height="wrap_content"
137            android:layout_alignParentEnd="true"
138            android:layout_alignParentBottom="true"
139            android:layout_margin="8dp"
140            android:alpha="0.7"
141            android:src="@drawable/ic_mic_off_black_24dp"
142            android:visibility="gone"
143            app:tint="@color/white" />
144
145        <RelativeLayout
146            android:id="@+id/button_row"
147            android:layout_width="match_parent"
148            android:layout_height="wrap_content"
149            android:layout_alignParentBottom="true"
150            android:layout_centerHorizontal="true"
151            android:layout_marginBottom="24dp">
152
153            <RelativeLayout
154                android:layout_width="288dp"
155                android:layout_height="wrap_content"
156                android:layout_centerInParent="true">
157
158                <com.google.android.material.floatingactionbutton.FloatingActionButton
159                    android:id="@+id/reject_call"
160                    android:layout_width="wrap_content"
161                    android:layout_height="wrap_content"
162                    android:layout_alignParentStart="true"
163                    android:layout_margin="16dp"
164                    android:src="@drawable/ic_call_end_white_48dp"
165                    android:visibility="gone"
166                    app:backgroundTint="@color/red700"
167                    app:elevation="4dp"
168                    app:fabCustomSize="72dp"
169                    app:maxImageSize="36dp"
170                    tools:visibility="visible" />
171
172                <com.google.android.material.floatingactionbutton.FloatingActionButton
173                    android:id="@+id/accept_call"
174                    android:layout_width="wrap_content"
175                    android:layout_height="wrap_content"
176                    android:layout_alignParentEnd="true"
177                    android:layout_centerVertical="true"
178                    android:layout_margin="16dp"
179                    android:src="@drawable/ic_call_white_48dp"
180                    android:visibility="gone"
181                    app:backgroundTint="@color/green700"
182                    app:elevation="4dp"
183                    app:fabCustomSize="72dp"
184                    app:maxImageSize="36dp"
185                    tools:visibility="visible" />
186
187            </RelativeLayout>
188
189            <com.google.android.material.floatingactionbutton.FloatingActionButton
190                android:id="@+id/in_call_action_left"
191                android:layout_width="wrap_content"
192                android:layout_height="wrap_content"
193                android:layout_centerVertical="true"
194                android:layout_margin="@dimen/in_call_fab_margin"
195                android:layout_toStartOf="@+id/end_call"
196                android:visibility="gone"
197                app:backgroundTint="?color_background_primary"
198                app:elevation="4dp"
199                app:fabSize="mini"
200                app:tint="?attr/icon_tint" />
201
202            <com.google.android.material.floatingactionbutton.FloatingActionButton
203                android:id="@+id/end_call"
204                android:layout_width="wrap_content"
205                android:layout_height="wrap_content"
206                android:layout_centerInParent="true"
207                android:layout_margin="@dimen/in_call_fab_margin_center"
208                android:src="@drawable/ic_call_end_white_48dp"
209                android:visibility="visible"
210                app:backgroundTint="@color/red700"
211                app:elevation="4dp"
212                app:fabCustomSize="72dp"
213                app:maxImageSize="36dp" />
214
215            <com.google.android.material.floatingactionbutton.FloatingActionButton
216                android:id="@+id/in_call_action_right"
217                android:layout_width="wrap_content"
218                android:layout_height="wrap_content"
219                android:layout_centerVertical="true"
220                android:layout_margin="@dimen/in_call_fab_margin"
221                android:layout_toEndOf="@+id/end_call"
222                android:visibility="gone"
223                app:backgroundTint="?color_background_primary"
224                app:elevation="4dp"
225                app:fabSize="mini"
226                app:tint="?attr/icon_tint" />
227
228            <com.google.android.material.floatingactionbutton.FloatingActionButton
229                android:id="@+id/in_call_action_far_right"
230                android:layout_width="wrap_content"
231                android:layout_height="wrap_content"
232                android:layout_centerVertical="true"
233                android:layout_margin="@dimen/in_call_fab_margin"
234                android:layout_toEndOf="@+id/in_call_action_right"
235                android:visibility="gone"
236                app:backgroundTint="?color_background_primary"
237                app:elevation="4dp"
238                app:fabSize="mini"
239                app:tint="?attr/icon_tint" />
240        </RelativeLayout>
241
242    </RelativeLayout>
243</layout>