mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-05-03 15:26:27 +00:00
Fixed conference chronometer having two different visibility binders
This commit is contained in:
parent
eb80a16202
commit
b7e7e08bbe
2 changed files with 7 additions and 8 deletions
|
|
@ -31,6 +31,7 @@ import androidx.activity.enableEdgeToEdge
|
||||||
import androidx.activity.result.contract.ActivityResultContracts
|
import androidx.activity.result.contract.ActivityResultContracts
|
||||||
import androidx.annotation.UiThread
|
import androidx.annotation.UiThread
|
||||||
import androidx.core.view.ViewCompat
|
import androidx.core.view.ViewCompat
|
||||||
|
import androidx.core.view.WindowCompat
|
||||||
import androidx.core.view.WindowInsetsCompat
|
import androidx.core.view.WindowInsetsCompat
|
||||||
import androidx.core.view.WindowInsetsControllerCompat
|
import androidx.core.view.WindowInsetsControllerCompat
|
||||||
import androidx.core.view.updatePadding
|
import androidx.core.view.updatePadding
|
||||||
|
|
@ -130,6 +131,9 @@ class CallActivity : GenericActivity() {
|
||||||
binding.lifecycleOwner = this
|
binding.lifecycleOwner = this
|
||||||
setUpToastsArea(binding.toastsArea)
|
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 ->
|
ViewCompat.setOnApplyWindowInsetsListener(binding.otherCallsTopBar.root) { v, windowInsets ->
|
||||||
val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars())
|
val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||||
v.updatePadding(0, insets.top, 0, 0)
|
v.updatePadding(0, insets.top, 0, 0)
|
||||||
|
|
@ -458,15 +462,11 @@ class CallActivity : GenericActivity() {
|
||||||
|
|
||||||
private fun hideUI(hide: Boolean) {
|
private fun hideUI(hide: Boolean) {
|
||||||
Log.i("$TAG Switching full screen mode to ${if (hide) "ON" else "OFF"}")
|
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) {
|
if (hide) {
|
||||||
windowInsetsCompat.let {
|
windowInsetsController.hide(WindowInsetsCompat.Type.systemBars())
|
||||||
it.hide(WindowInsetsCompat.Type.systemBars())
|
|
||||||
it.systemBarsBehavior =
|
|
||||||
WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
windowInsetsCompat.show(WindowInsetsCompat.Type.systemBars())
|
windowInsetsController.show(WindowInsetsCompat.Type.systemBars())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,6 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:visibility="@{conferenceViewModel.isPaused ? View.GONE : View.VISIBLE}"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/separator"
|
app:layout_constraintStart_toEndOf="@id/separator"
|
||||||
app:layout_constraintEnd_toStartOf="@id/paused_call_header"
|
app:layout_constraintEnd_toStartOf="@id/paused_call_header"
|
||||||
app:layout_constraintTop_toTopOf="@id/conference_subject"/>
|
app:layout_constraintTop_toTopOf="@id/conference_subject"/>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue