diff --git a/app/src/main/java/org/linphone/ui/call/CallActivity.kt b/app/src/main/java/org/linphone/ui/call/CallActivity.kt index cd44fd8b8..c1826637a 100644 --- a/app/src/main/java/org/linphone/ui/call/CallActivity.kt +++ b/app/src/main/java/org/linphone/ui/call/CallActivity.kt @@ -31,6 +31,7 @@ import androidx.activity.enableEdgeToEdge import androidx.activity.result.contract.ActivityResultContracts import androidx.annotation.UiThread import androidx.core.view.ViewCompat +import androidx.core.view.WindowCompat import androidx.core.view.WindowInsetsCompat import androidx.core.view.WindowInsetsControllerCompat import androidx.core.view.updatePadding @@ -130,6 +131,9 @@ class CallActivity : GenericActivity() { binding.lifecycleOwner = this setUpToastsArea(binding.toastsArea) + val windowInsetsController = WindowCompat.getInsetsController(window, window.decorView) + windowInsetsController.systemBarsBehavior = WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE + ViewCompat.setOnApplyWindowInsetsListener(binding.otherCallsTopBar.root) { v, windowInsets -> val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()) v.updatePadding(0, insets.top, 0, 0) @@ -458,15 +462,11 @@ class CallActivity : GenericActivity() { private fun hideUI(hide: Boolean) { Log.i("$TAG Switching full screen mode to ${if (hide) "ON" else "OFF"}") - val windowInsetsCompat = WindowInsetsControllerCompat(window, window.decorView) + val windowInsetsController = WindowCompat.getInsetsController(window, window.decorView) if (hide) { - windowInsetsCompat.let { - it.hide(WindowInsetsCompat.Type.systemBars()) - it.systemBarsBehavior = - WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE - } + windowInsetsController.hide(WindowInsetsCompat.Type.systemBars()) } else { - windowInsetsCompat.show(WindowInsetsCompat.Type.systemBars()) + windowInsetsController.show(WindowInsetsCompat.Type.systemBars()) } } diff --git a/app/src/main/res/layout/call_active_conference_fragment.xml b/app/src/main/res/layout/call_active_conference_fragment.xml index 6ddf65ca0..b795b5241 100644 --- a/app/src/main/res/layout/call_active_conference_fragment.xml +++ b/app/src/main/res/layout/call_active_conference_fragment.xml @@ -103,7 +103,6 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="5dp" - android:visibility="@{conferenceViewModel.isPaused ? View.GONE : View.VISIBLE}" app:layout_constraintStart_toEndOf="@id/separator" app:layout_constraintEnd_toStartOf="@id/paused_call_header" app:layout_constraintTop_toTopOf="@id/conference_subject"/>