简体   繁体   English

带有操作栏选项卡的导航抽屉

[英]Navigation Drawers with Action Bar Tabs

I have read something that "you shouldn't use Navigation Drawers with Action Bar Tabs" (Roman Nurik at https://plus.google.com/u/0/+DavidTaSmoochibi/posts/8dWEkFcbTFX ). 我读过一些东西,“您不应该将导航抽屉与操作栏选项卡一起使用”(Roman Nurik, 网址https://plus.google.com/u/0/+DavidTaSmoochibi/posts/8dWEkFcbTFX )。 Is there any meaningful reason of this ? 有什么有意义的原因吗? So if a team decided to create a big project with Action Bar Tabs and then on the second version, they decided to put a cool slider menu on the left side with Navigation Drawer, in this case they have to re-implement all tabs by avoiding Action Bar Tab styling ?? 因此,如果一个团队决定使用“动作栏”选项卡创建一个大型项目,然后在第二个版本中,他们决定使用“导航抽屉”在左侧放置一个很酷的滑块菜单,在这种情况下,他们必须避免使用重新实现所有选项卡动作栏标签样式

I use them in the same project but I saw that the Action Bar Tabs are always above the Navigation Drawer. 我在同一项目中使用了它们,但是我看到“动作栏”选项卡始终位于导航抽屉上方。

Is there any way to use both in the way the Navigation Drawer works as it should be (over the other elements) ? 有什么方法可以同时使用导航抽屉的工作方式(在其他元素上)?

A classic example would be Google's Play Store itself. 一个典型的例子就是Google的Play商店本身。 If it has the navigation drawer then it will not have the action bar tabs and if it has action bar tabs it will not have the navigation drawer. 如果它具有导航抽屉,则它将不具有操作栏选项卡,如果它具有操作栏选项卡,则将不具有导航抽屉。

I think this is basically because if you click on one element of the navigation drawer, then the Activity has to load a Fragment into its FrameLayout . 我认为这基本上是因为,如果单击导航抽屉中的一个元素,则Activity必须将Fragment加载到其FrameLayout In case of action bar tabs too, the Activity has to deal with Fragment s. 对于操作栏选项卡,Activity也必须处理Fragment

So, even if it is possible, I wouldn't go through the hassle of implementing it. 因此,即使有可能,我也不会经历实施它的麻烦。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM