Answer the question
In order to leave comments, you need to log in
How to make it so that when using the viewpager, the floating action button remains in place, but the icon and functionality change?
I have a TabLayout with 2 tabs and a ViewPager. In each tab, you need to set your own FloatingActionButton functions (in one fragment, it performs one function, in another fragment, another). But it is necessary that when using the ViewPager, the button remains in its place with a change in the icon and its functionality. Whether it is possible to implement it somehow? (an example of such a function is in telegram x and whats app, but one application does not understand, in another this solution is very difficult to find)
Answer the question
In order to leave comments, you need to log in
On the viewpager, listener onPageChanged, in this listener, do whatever you want from the factory.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question