mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-04-24 13:08:33 +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? {
|
override fun onCreateAnimation(transit: Int, enter: Boolean, nextAnim: Int): Animation? {
|
||||||
if (findNavController().currentDestination?.id == R.id.newCallFragment || findNavController().currentDestination?.id == R.id.callsListFragment) {
|
if (findNavController().currentDestination?.id == R.id.newCallFragment || findNavController().currentDestination?.id == R.id.callsListFragment) {
|
||||||
// Holds fragment in place while new fragment slides over it
|
// Holds fragment in place while new fragment slides over it
|
||||||
|
|
@ -127,7 +139,8 @@ class ActiveCallFragment : GenericCallFragment() {
|
||||||
actionsBottomSheetBehavior.state = BottomSheetBehavior.STATE_COLLAPSED
|
actionsBottomSheetBehavior.state = BottomSheetBehavior.STATE_COLLAPSED
|
||||||
|
|
||||||
val numpadBottomSheetBehavior = BottomSheetBehavior.from(binding.callNumpad.root)
|
val numpadBottomSheetBehavior = BottomSheetBehavior.from(binding.callNumpad.root)
|
||||||
numpadBottomSheetBehavior.state = BottomSheetBehavior.STATE_COLLAPSED
|
numpadBottomSheetBehavior.state = BottomSheetBehavior.STATE_HIDDEN
|
||||||
|
numpadBottomSheetBehavior.addBottomSheetCallback(bottomSheetCallback)
|
||||||
|
|
||||||
binding.setNewCallClickListener {
|
binding.setNewCallClickListener {
|
||||||
val action = ActiveCallFragmentDirections.actionActiveCallFragmentToNewCallFragment()
|
val action = ActiveCallFragmentDirections.actionActiveCallFragmentToNewCallFragment()
|
||||||
|
|
@ -157,6 +170,7 @@ class ActiveCallFragment : GenericCallFragment() {
|
||||||
callViewModel.fullScreenMode.observe(viewLifecycleOwner) { hide ->
|
callViewModel.fullScreenMode.observe(viewLifecycleOwner) { hide ->
|
||||||
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"}")
|
||||||
sharedViewModel.toggleFullScreenEvent.value = Event(hide)
|
sharedViewModel.toggleFullScreenEvent.value = Event(hide)
|
||||||
|
numpadBottomSheetBehavior.state = BottomSheetBehavior.STATE_HIDDEN
|
||||||
}
|
}
|
||||||
|
|
||||||
callViewModel.isRemoteDeviceTrusted.observe(viewLifecycleOwner) { trusted ->
|
callViewModel.isRemoteDeviceTrusted.observe(viewLifecycleOwner) { trusted ->
|
||||||
|
|
|
||||||
|
|
@ -257,7 +257,6 @@
|
||||||
|
|
||||||
<include
|
<include
|
||||||
android:id="@+id/call_numpad"
|
android:id="@+id/call_numpad"
|
||||||
android:visibility="@{viewModel.fullScreenMode || viewModel.pipMode ? View.INVISIBLE : View.VISIBLE}"
|
|
||||||
layout="@layout/call_numpad_bottom_sheet"
|
layout="@layout/call_numpad_bottom_sheet"
|
||||||
bind:model="@{numpadModel}"/>
|
bind:model="@{numpadModel}"/>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue