如何实现机器人的导航抽屉里也是这样吗?也是、机器人、如何实现、抽屉里

2023-09-05 00:52:38 作者:風逝去的泪痕

如何实现这样的android导航抽屉里?

How to implement android navigation drawer like this?

TopLevelView1〜TopLevelView4可以选择并没有孩子 TopVevelView5可以collaspe

TopLevelView1 ~ TopLevelView4 can select and no children TopVevelView5 can collaspe

我的问题是,如果我的组结构类似这样的例子

My question is that if my group structure like this for example

所有 盯着 分类 ---- MP3 ---- TXT ---- DOC ---- PDF

All Stared Category ----mp3 ----txt ----doc ----pdf

当我选择全部然后显示所有文件。

when I select all then show all file.

当我选择瞪大了眼睛再展盯着文件只。

when I select stared then show stared file only.

当我选择MP3则仅显示MP3文件。

when I select mp3 then show only mp3 files.

和类别可以展开和折叠。

and Category can expand and collapse.

推荐答案

对于导航:的

替代品1:

滑动菜单,这我肯定会跟去。即使使用如LinkedIn和Foursquare,易流行的应用实施和使用。完整的解释和示例源$ C ​​$ CS: SlidingMenu - GitHub的

Sliding Menu, which I would definitely go with. Even used by popular application like LinkedIn and Foursquare and easy to implement and use. Full explanation and example source codes: SlidingMenu - GitHub

方案2:

Android的导航抽屉。如果你想自己完全自定义的一切,而无需使用任何库,这是你的选择。您可以检查codeS以及如何从Android开发者网站做到这一点:创建导航抽屉

Android Navigation Drawer. If you want to fully customise everything yourself without using any libraries, this is your option. You can check codes and how to do it from Android Developers website: Creating a Navigation Drawer

查看你的抽屉式导航/滑动菜单里面的:的

替代品1:

Android的默认ExpandableListView。相关链接: Android开发者,的 androidhive

Android default ExpandableListView. Links: Android Developers , androidhive

方案2:

AnimatedExpandableListView,这是从ExpandableListView实施,但项目被点击时,展开与一个流畅的动画,你可以preFER用于更好看完成的。 AnimatedExpandableListView

AnimatedExpandableListView, which is implemented from ExpandableListView, but when an item is clicked, the expand is done with a smooth animation which you may prefer to use for a better look. AnimatedExpandableListView