Background
setListNavigationCallbacks is used to allow the user to easily switch between different views of the current screen through the ActionBar, as shown in the figure here and here .
Problem
I noticed that it is deprecated from API21 (Lollipop), and that all the documentation says that you need to look for different navigation solutions, but it does not say which of the best is suitable for the same point:
This method is deprecated. The navigation modes of the action bar are outdated and not supported by the built-in toolbar action panels. Consider using other common navigation patterns .
All other functions / classes associated with this function are also deprecated, e.g. setNavigationMode , OnNavigationListener , ActionBar.NAVIGATION_MODE_LIST .
What i tried
The navigation box is intended for navigation on different screens, and not for different types of the same screen.
adding an action element that provides a way to switch between modes, but a little strange ...
using ViewPager, but it’s also weird as it really doesn’t switch views and also takes up more space.
Using tabs, but I think it is deprecated too, and it takes up more space.
Question
What should be the best alternative to this navigation path?
source share