mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixed numpad bottom sheet visible after switching fullscreen mode in video call
This commit is contained in:
parent
b87a3dd92c
commit
d82eac6175
2 changed files with 15 additions and 2 deletions
|
|
@ -90,6 +90,18 @@ class ActiveCallFragment : GenericCallFragment() {
|
|||
}
|
||||
}
|
||||
|
||||
private val bottomSheetCallback = object : BottomSheetBehavior.BottomSheetCallback() {
|
||||
override fun onStateChanged(bottomSheet: View, newState: Int) {
|
||||
Log.i("$TAG Bottom sheet state is [$newState]")
|
||||
if (newState == BottomSheetBehavior.STATE_COLLAPSED) {
|
||||
val numpadBottomSheetBehavior = BottomSheetBehavior.from(bottomSheet)
|
||||
numpadBottomSheetBehavior.state = BottomSheetBehavior.STATE_HIDDEN
|
||||
}
|
||||
}
|
||||
|
||||
override fun onSlide(bottomSheet: View, slideOffset: Float) { }
|
||||
}
|
||||
|
||||
override fun onCreateAnimation(transit: Int, enter: Boolean, nextAnim: Int): Animation? {
|
||||
if (findNavController().currentDestination?.id == R.id.newCallFragment || findNavController().currentDestination?.id == R.id.callsListFragment) {
|
||||
// Holds fragment in place while new fragment slides over it
|
||||
|
|
@ -127,7 +139,8 @@ class ActiveCallFragment : GenericCallFragment() {
|
|||
actionsBottomSheetBehavior.state = BottomSheetBehavior.STATE_COLLAPSED
|
||||
|
||||
val numpadBottomSheetBehavior = BottomSheetBehavior.from(binding.callNumpad.root)
|
||||
numpadBottomSheetBehavior.state = BottomSheetBehavior.STATE_COLLAPSED
|
||||
numpadBottomSheetBehavior.state = BottomSheetBehavior.STATE_HIDDEN
|
||||
numpadBottomSheetBehavior.addBottomSheetCallback(bottomSheetCallback)
|
||||
|
||||
binding.setNewCallClickListener {
|
||||
val action = ActiveCallFragmentDirections.actionActiveCallFragmentToNewCallFragment()
|
||||
|
|
@ -157,6 +170,7 @@ class ActiveCallFragment : GenericCallFragment() {
|
|||
callViewModel.fullScreenMode.observe(viewLifecycleOwner) { hide ->
|
||||
Log.i("$TAG Switching full screen mode to ${if (hide) "ON" else "OFF"}")
|
||||
sharedViewModel.toggleFullScreenEvent.value = Event(hide)
|
||||
numpadBottomSheetBehavior.state = BottomSheetBehavior.STATE_HIDDEN
|
||||
}
|
||||
|
||||
callViewModel.isRemoteDeviceTrusted.observe(viewLifecycleOwner) { trusted ->
|
||||
|
|
|
|||
|
|
@ -257,7 +257,6 @@
|
|||
|
||||
<include
|
||||
android:id="@+id/call_numpad"
|
||||
android:visibility="@{viewModel.fullScreenMode || viewModel.pipMode ? View.INVISIBLE : View.VISIBLE}"
|
||||
layout="@layout/call_numpad_bottom_sheet"
|
||||
bind:model="@{numpadModel}"/>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue