make sure the proper layouts are shown at incoming/outgoing calls

This commit is contained in:
tibbi 2020-05-01 22:32:47 +02:00
parent 76a85466ce
commit 78e87e2df5
2 changed files with 9 additions and 2 deletions

View File

@ -159,6 +159,7 @@ class CallActivity : SimpleActivity() {
private fun updateCallState(state: Int) {
when (state) {
Call.STATE_RINGING -> callRinging()
Call.STATE_ACTIVE -> callStarted()
Call.STATE_DISCONNECTED -> endCall()
Call.STATE_CONNECTING -> initOutgoingCallUI()
@ -190,6 +191,10 @@ class CallActivity : SimpleActivity() {
ongoing_call_holder.beVisible()
}
private fun callRinging() {
incoming_call_holder.beVisible()
}
private fun callStarted() {
incoming_call_holder.beGone()
ongoing_call_holder.beVisible()

View File

@ -44,7 +44,8 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/ongoing_call_holder"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:visibility="gone">
<ImageView
android:id="@+id/call_toggle_microphone"
@ -104,7 +105,8 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/incoming_call_holder"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:visibility="gone">
<ImageView
android:id="@+id/call_decline"