Android material tabs w/ appcompat

144 views Asked by At

I want to setup a 'tabbed' application. Looking through all the tutorials including the google docs here:

http://developer.android.com/training/implementing-navigation/lateral.html

However as I start to go through the docs I get all kinds of deprecated warnings:

actionBar.setSelectedNavigationItem(position);

I would really like to start off right and use any new non deprecated methods. Most examples of tab applications are years old. What am I missing? Am I searching for the wrong thing? Can someone point me in the right direction for developing a tabbed application.

1

There are 1 answers

2
CommonsWare On BEST ANSWER

What am I missing?

Action bar tabs were deprecated in Android 5.0, last fall.

Can someone point me in the right direction for developing a tabbed application.

Use TabLayout, though this is a very new addition to the Android Support libraries.

Or, use ViewPager with your favorite tabbed indicator, of which there are many.

Or, use FragmentTabHost.