Add connection loader

This commit is contained in:
Valere 2020-06-19 15:20:26 +02:00
parent 2868d62185
commit bd19225219
2 changed files with 16 additions and 1 deletions

View File

@ -224,6 +224,7 @@ class VectorCallActivity : VectorBaseActivity(), CallControlsView.InteractionLis
callControlsView.updateForState(state)
val callState = state.callState.invoke()
callConnectingProgress.isVisible = false
when (callState) {
is CallState.Idle,
is CallState.Dialing -> {
@ -244,6 +245,7 @@ class VectorCallActivity : VectorBaseActivity(), CallControlsView.InteractionLis
callVideoGroup.isInvisible = true
callInfoGroup.isVisible = true
callStatusText.setText(R.string.call_connecting)
callConnectingProgress.isVisible = true
configureCallInfo(state)
}
is CallState.Connected -> {
@ -264,6 +266,7 @@ class VectorCallActivity : VectorBaseActivity(), CallControlsView.InteractionLis
callInfoGroup.isVisible = true
configureCallInfo(state)
callStatusText.setText(R.string.call_connecting)
callConnectingProgress.isVisible = true
}
// ensure all attached?
peerConnectionManager.attachViewRenderers(pipRenderer, fullscreenRenderer, null)

View File

@ -3,9 +3,9 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/constraintLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/constraintLayout"
android:background="?riotx_background"
tools:ignore="MergeRootFrame">
@ -73,6 +73,18 @@
app:layout_constraintTop_toBottomOf="@id/otherMemberAvatar"
tools:text="Connecting..." />
<ProgressBar
android:id="@+id/callConnectingProgress"
style="?android:attr/progressBarStyle"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_margin="8dp"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/callStatusText"
tools:visibility="visible" />
<androidx.constraintlayout.widget.Group
android:id="@+id/callInfoGroup"
android:layout_width="wrap_content"