I\'m using TabLayout and viewPager with an option to swipe the viewPager to the left or right in order to navigate between pages.
My problem is, that my application
If you are using viewpager2 with fragments. you can use.
I hope this helps somebody.