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="32dp"
 59                android:textAppearance="@style/TextAppearance.Conversations.Display2"
 60                android:textColor="@color/white"
 61                tools:text="Juliet Capulet" />
 62
 63        </com.google.android.material.appbar.AppBarLayout>
 64
 65        <RelativeLayout
 66            android:layout_width="match_parent"
 67            android:layout_height="wrap_content"
 68            android:layout_above="@+id/button_row"
 69            android:layout_below="@id/app_bar_layout">
 70
 71            <TextView
 72                android:id="@+id/duration"
 73                android:layout_width="wrap_content"
 74                android:layout_height="wrap_content"
 75                android:layout_centerHorizontal="true"
 76                android:layout_margin="24dp"
 77                android:textAppearance="@style/TextAppearance.Conversations.Title.Monospace"
 78                tools:text="01:23" />
 79
 80            <com.makeramen.roundedimageview.RoundedImageView
 81                android:id="@+id/contact_photo"
 82                android:layout_width="@dimen/publish_avatar_size"
 83                android:layout_height="@dimen/publish_avatar_size"
 84                android:layout_centerInParent="true"
 85                app:riv_corner_radius="@dimen/incoming_call_radius" />
 86
 87        </RelativeLayout>
 88
 89
 90        <org.webrtc.SurfaceViewRenderer
 91            android:id="@+id/local_video"
 92            android:layout_width="@dimen/local_video_preview_width"
 93            android:layout_height="@dimen/local_video_preview_height"
 94            android:layout_below="@+id/app_bar_layout"
 95            android:layout_alignParentEnd="true"
 96            android:layout_alignParentRight="true"
 97            android:layout_marginTop="24dp"
 98            android:layout_marginEnd="24dp"
 99            android:layout_marginRight="24dp"
100            android:visibility="gone"
101            app:elevation="4dp" />
102
103        <org.webrtc.SurfaceViewRenderer
104            android:id="@+id/remote_video"
105            android:layout_width="match_parent"
106            android:layout_height="match_parent"
107            android:layout_below="@+id/app_bar_layout"
108            android:layout_alignParentStart="true"
109            android:layout_alignParentLeft="true"
110            android:layout_alignParentBottom="true"
111            android:visibility="gone" />
112
113        <ImageView
114            android:id="@+id/pip_local_mic_off_indicator"
115            android:layout_width="wrap_content"
116            android:layout_height="wrap_content"
117            android:layout_alignParentEnd="true"
118            android:layout_alignParentRight="true"
119            android:layout_alignParentBottom="true"
120            android:layout_margin="8dp"
121            android:alpha="0.7"
122            android:src="@drawable/ic_mic_off_black_24dp"
123            android:tint="@color/white"
124            android:visibility="gone" />
125
126        <RelativeLayout
127            android:id="@+id/button_row"
128            android:layout_width="match_parent"
129            android:layout_height="wrap_content"
130            android:layout_alignParentBottom="true"
131            android:layout_centerHorizontal="true"
132            android:layout_marginBottom="24dp">
133
134            <RelativeLayout
135                android:layout_width="288dp"
136                android:layout_height="wrap_content"
137                android:layout_centerInParent="true">
138
139                <com.google.android.material.floatingactionbutton.FloatingActionButton
140                    android:id="@+id/reject_call"
141                    android:layout_width="wrap_content"
142                    android:layout_height="wrap_content"
143                    android:layout_alignParentStart="true"
144                    android:layout_alignParentLeft="true"
145                    android:layout_margin="16dp"
146                    android:src="@drawable/ic_call_end_white_48dp"
147                    android:visibility="gone"
148                    app:backgroundTint="@color/red700"
149                    app:elevation="4dp"
150                    app:fabCustomSize="72dp"
151                    app:maxImageSize="36dp"
152                    tools:visibility="visible" />
153
154                <com.google.android.material.floatingactionbutton.FloatingActionButton
155                    android:id="@+id/accept_call"
156                    android:layout_width="wrap_content"
157                    android:layout_height="wrap_content"
158                    android:layout_alignParentEnd="true"
159                    android:layout_alignParentRight="true"
160                    android:layout_centerVertical="true"
161                    android:layout_margin="16dp"
162                    android:src="@drawable/ic_call_white_48dp"
163                    android:visibility="gone"
164                    app:backgroundTint="@color/green700"
165                    app:elevation="4dp"
166                    app:fabCustomSize="72dp"
167                    app:maxImageSize="36dp"
168                    tools:visibility="visible" />
169
170            </RelativeLayout>
171
172            <com.google.android.material.floatingactionbutton.FloatingActionButton
173                android:id="@+id/in_call_action_left"
174                android:layout_width="wrap_content"
175                android:layout_height="wrap_content"
176                android:layout_centerVertical="true"
177                android:layout_margin="@dimen/in_call_fab_margin"
178                android:layout_toStartOf="@+id/end_call"
179                android:layout_toLeftOf="@+id/end_call"
180                android:visibility="gone"
181                app:backgroundTint="?color_background_primary"
182                app:elevation="4dp"
183                app:fabSize="mini"
184                app:tint="?attr/icon_tint" />
185
186            <com.google.android.material.floatingactionbutton.FloatingActionButton
187                android:id="@+id/end_call"
188                android:layout_width="wrap_content"
189                android:layout_height="wrap_content"
190                android:layout_centerInParent="true"
191                android:layout_margin="@dimen/in_call_fab_margin_center"
192                android:src="@drawable/ic_call_end_white_48dp"
193                android:visibility="visible"
194                app:backgroundTint="@color/red700"
195                app:elevation="4dp"
196                app:fabCustomSize="72dp"
197                app:maxImageSize="36dp" />
198
199            <com.google.android.material.floatingactionbutton.FloatingActionButton
200                android:id="@+id/in_call_action_right"
201                android:layout_width="wrap_content"
202                android:layout_height="wrap_content"
203                android:layout_centerVertical="true"
204                android:layout_margin="@dimen/in_call_fab_margin"
205                android:layout_toEndOf="@+id/end_call"
206                android:layout_toRightOf="@+id/end_call"
207                android:visibility="gone"
208                app:backgroundTint="?color_background_primary"
209                app:elevation="4dp"
210                app:fabSize="mini"
211                app:tint="?attr/icon_tint" />
212
213            <com.google.android.material.floatingactionbutton.FloatingActionButton
214                android:id="@+id/in_call_action_far_right"
215                android:layout_width="wrap_content"
216                android:layout_height="wrap_content"
217                android:layout_centerVertical="true"
218                android:layout_margin="@dimen/in_call_fab_margin"
219                android:layout_toEndOf="@+id/in_call_action_right"
220                android:layout_toRightOf="@+id/in_call_action_right"
221                android:visibility="gone"
222                app:backgroundTint="?color_background_primary"
223                app:elevation="4dp"
224                app:fabSize="mini"
225                app:tint="?attr/icon_tint" />
226        </RelativeLayout>
227
228    </RelativeLayout>
229</layout>