0

I have an activity and inside this using Fragment with ConstraintLayout container. I enabled left navigation bar with swipe right but I am not able to dismiss it or know if it's dismissed as per my wish though hide() and show() method works well only for first time I am doing a full screen or exit full screen. I tried using isVisible() method so that I can call manually hide() method but it's not working well, below method only called first time when we do a full screen or exit from full screen. But if it's already in full screen and if we swipe left nav bar it's not calling -

ViewCompat.setOnApplyWindowInsetsListener(view) { _, insets -> ............ } 

Below method always returns false if my app is already in full screen and if I try nav bar swipe left/open - even though nav bar is open it still return false in this case, and that's why I never able to know if user opened the nav bar by swiping right -

mSystemBarVisible = insets.isVisible(WindowInsetsCompat.Type.navigationBars()) 

I am using below behavior -

insetsController.systemBarsBehavior = WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE 

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.