Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Design on Android 4.0 (Tab layout)

I'm not sure what direction to take with a Tabbed layout.

I am targeting sdk 15, min sdk 11. Are tabs better left in the action bar or in the "body". I am not designing for tablets with this app (yet), but it seems tablets have tabs in the Action bar and smaller screens do not.

One of the main reasons why I ask is because Google does have some info on tabs here: http://developer.android.com/design/building-blocks/tabs.html

But I can't seem to find it in their new "Develop" section. So I don't know if this has been deprecated? There used to be a good example on Tab layouts.

like image 804
TheLettuceMaster Avatar asked May 31 '26 03:05

TheLettuceMaster


1 Answers

You can still use them. They are not deprecated. In the post android 3.0 versions the tabs have been placed in the action bar on tablets. on phones they are below the action bar in portrait and again in the action bar in landscape. it's is considered a good practice to follow those standards as android developer suggests. Now i haven't used the new implementations but rather a compatibility library called ActionBarSherlock. it is actually pretty good and its almost exactly the same in terms of usage as the regular tabs. you can find some good samples on how to implement what you need in there.

Also i am pretty sure you can find all the samples in your android sdk folder under samples/android-14 for example.

I always felt that its easier to browse through them from there as opposed to developer.android.

Hope this helps you.

like image 152
DArkO Avatar answered Jun 01 '26 17:06

DArkO



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!