What are the official Android recommendations for tabs?
Asked Answered
U

1

2

I have to say I'm pretty lost when it comes to designing tabbed layouts on Android right now. The platform developers seem to be evolving the design faster than I can figure out their intentions.

From what I can gather from the combination of the recently deprecated TabActivity and the new design guide, I think they intend for tabs to be exclusively with the Action Bar, either inside the main action bar or stacked on a secondary action bar.

Though the developer's guide suggests using the Action Bar for "global navigation". Does this mean that it's recommended to create your own tabs outside the Action Bar if your tabs only apply to a particular application context?

Underset answered 13/9, 2012 at 23:44 Comment(0)
T
2

"Global" is used in a local context here. :) The intent of that statement is to say that action bar tabs should be used for activity-global navigation, and that you should refrain from using action bar tabs to switch navigation within a sub-pane of the same activity.

This mostly applies to large-screen or tablet layouts where you might have multiple panes of content. If you use action bar tabs in such a configuration, it wouldn't make sense for those tabs to only apply to the right detail pane of the activity but leave a left pane alone. If you wanted tabs that only apply to a single pane of an activity, those tabs should be part of that pane rather than part of the action bar.

Basically, tabs should always be local to the content that they affect. If switching tabs switches between different content for the whole activity window, use action bar tabs. If tabs are more local to a smaller part of your UI, place them closer to the content that will actually change when you select a new tab.

Trespass answered 14/9, 2012 at 0:26 Comment(4)
You should always treat a tab switch as a simple view (or sometimes fragment) switch. Switching tabs does not create history. You should never switch Activities as the result of a tab switch.Trespass
Right, that was my understanding. Sorry for that mess of a sentence, I meant to say: "I was [prior to your answer] interpreting global to mean that the tab choices should stay fixed regardless of what you are doing inside the app." For example, if you're uploading a you tube video, looking at a list of videos, or watching a video within the You Tube app, the tab choices should not change based on app (lower-case c) context.Underset
Hey Adam, do you know of a better forum for subjective Android design questions? If not, maybe you could use your clout to lobby for a Google group dedicated to Android design discussion? P.S. I love the new app makeover show.Underset
There are a bunch of Android design enthusiasts on Google+ including a bunch of Android team members who occasionally chime in on such things. The Android Developers page and #androiddev hashtag can both be useful there. Glad you've enjoyed the show; I was just a guest for that week but I hope to do more of them in the future.Trespass

© 2022 - 2024 — McMap. All rights reserved.