mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
make sure the proper layouts are shown at incoming/outgoing calls
This commit is contained in:
@ -159,6 +159,7 @@ class CallActivity : SimpleActivity() {
|
|||||||
|
|
||||||
private fun updateCallState(state: Int) {
|
private fun updateCallState(state: Int) {
|
||||||
when (state) {
|
when (state) {
|
||||||
|
Call.STATE_RINGING -> callRinging()
|
||||||
Call.STATE_ACTIVE -> callStarted()
|
Call.STATE_ACTIVE -> callStarted()
|
||||||
Call.STATE_DISCONNECTED -> endCall()
|
Call.STATE_DISCONNECTED -> endCall()
|
||||||
Call.STATE_CONNECTING -> initOutgoingCallUI()
|
Call.STATE_CONNECTING -> initOutgoingCallUI()
|
||||||
@ -190,6 +191,10 @@ class CallActivity : SimpleActivity() {
|
|||||||
ongoing_call_holder.beVisible()
|
ongoing_call_holder.beVisible()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun callRinging() {
|
||||||
|
incoming_call_holder.beVisible()
|
||||||
|
}
|
||||||
|
|
||||||
private fun callStarted() {
|
private fun callStarted() {
|
||||||
incoming_call_holder.beGone()
|
incoming_call_holder.beGone()
|
||||||
ongoing_call_holder.beVisible()
|
ongoing_call_holder.beVisible()
|
||||||
|
@ -44,7 +44,8 @@
|
|||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/ongoing_call_holder"
|
android:id="@+id/ongoing_call_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/call_toggle_microphone"
|
android:id="@+id/call_toggle_microphone"
|
||||||
@ -104,7 +105,8 @@
|
|||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/incoming_call_holder"
|
android:id="@+id/incoming_call_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/call_decline"
|
android:id="@+id/call_decline"
|
||||||
|
Reference in New Issue
Block a user