操作栏导航模式pcated Android中升去$ P $ [英] Action bar navigation modes are deprecated in Android L

查看:176
本文介绍了操作栏导航模式pcated Android中升去$ P $的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

纵观该API差异报告对于Android的LpreVIEW,我看到相关的导航模式在动作条类的所有方法(例如为 setNavigationMode() addTab() selectTab(),和C)。现在去precated。

Taking a look at the API diff report for the Android "L" preview, I see that all methods related to navigation modes in the ActionBar class (such as setNavigationMode(), addTab(), selectTab(), &c). are now deprecated.

该文档解释了:

动作栏导航模式去precated和不支持的内联   工具栏操作栏。请考虑使用其他常用的导航模式   代替。

Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other common navigation patterns instead.

什么是应该更换?

另外,是内联工具栏操作栏的新概念?我不认为我以前听说过。

Also, is "inline toolbar action bars" a new concept? I don't think I've heard of it before.

推荐答案

新的 Android的设计支持库增加<一个href="https://developer.android.com/reference/android/support/design/widget/TabLayout.html">TabLayout,提供一个标签的实现相匹配的标签的材料设计方针。

The new Android Design Support Library adds TabLayout, providing a tab implementation that matches the material design guidelines for tabs.

现在去precated:的<一个href="http://developer.android.com/reference/android/support/v4/view/PagerTabStrip.html">PagerTabStrip是支持库的一部分(已经有一段时间),并作为一个直接的替代品。如果preFER较新的谷歌游戏风格的标签,您可以使用 PagerSlidingTabStrip库或修改无论是谷歌提供的例子< A HREF =htt​​p://developer.android.com/samples/SlidingTabsBasic/index.html> SlidingTabsBasic 或的 SlidingTabsColors 的如本开发字节影片解释。

Now deprecated: The PagerTabStrip is part of the support library (and has been for some time) and serves as a direct replacement. If you prefer the newer Google Play style tabs, you can use the PagerSlidingTabStrip library or modify either of the Google provided examples SlidingTabsBasic or SlidingTabsColors as explained in this Dev Bytes video.

这篇关于操作栏导航模式pcated Android中升去$ P $的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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