什么是标签页的官方 Android 建议? [英] What are the official Android recommendations for tabs?

查看:26
本文介绍了什么是标签页的官方 Android 建议?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不得不说我现在在 Android 上设计选项卡式布局时非常迷茫.平台开发人员的设计发展速度似乎比我弄清楚他们的意图要快.

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.

从我可以从最近弃用的 TabActivity 的组合中收集到的信息 和新的 设计指南,我想他们打算选项卡与操作栏独占,可以在主操作栏内,也可以堆叠在辅助操作栏上.

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?

推荐答案

全局"在此处用于本地上下文.:) 该声明的意图是说操作栏选项卡应该用于活动全局导航,并且您应该避免使用操作栏选项卡在同一活动的子窗格中切换导航.

"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.

基本上,标签应始终位于其影响的内容的本地.如果切换选项卡在整个活动窗口的不同内容之间切换,请使用操作栏选项卡.如果选项卡在您的 UI 的较小部分中更本地化,请将它们放置在更靠近您选择新选项卡时实际会更改的内容的位置.

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.

这篇关于什么是标签页的官方 Android 建议?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆