Replacement for ActionBar navigation

I have upgraded to Android 5.0, API 21 and all my navigation for tabs and lists in ActionBar is deprecated. I have not yet found a sensible replacement that allows lists and tabs to be included as my application requires.

What new methods can I use to replace the deprecated methods: For lists:

// Set up the action bar to show a dropdown list.
final android.app.ActionBar actionBar = getActionBar();
actionBar.setDisplayShowTitleEnabled(false); // DEPRACATED
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST); // NAVIGATION_MODE_LIST DEPRECATED

      

For tabbed navigation: Class:

public class GroupIndFriendActivity extends ActionBarActivity implements
        ActionBar.TabListener { // TabListener DEPRECATED 

      

...

// Set up the action bar.
final ActionBar actionBar = getSupportActionBar();
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); // DEPRECATED 

      

...

public void onTabSelected(ActionBar.Tab tab,                 // DEPRECATED 
        FragmentTransaction fragmentTransaction) {

      

+3


source to share


1 answer


You can use PageTabStrip or app drawer (link will give you a detailed step by step guide to customize app drawer )



This stackoverflow can help you.

0


source







All Articles