用于在树层次结构中导航的 Android 控件
我想在树层次结构中导航项目。
我将这些项目放在列表视图中的同一级别上。单击列表视图中的项目后,它将打开另一个列表视图以显示子级别中的项目。
我希望用户能够轻松导航到另一个级别(父母、祖父母、曾祖父母),而无需多次按后退按钮。
处理这个问题的最佳方法是什么(什么类型的 Android 控件)?提供的例子会很棒。
I want to navigate items in a tree hierarchy.
I put the items on the same level in a listview. Upon clicking the item in the listview it will open another listview to show the items in the child level.
I want the user to navigate easily to another level (parent, grandparent, grandgrandparent) without pressing the back buttons several times.
What is the best way (what type of Android controls) to handle this? Examples provided will be great.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您可以使用此
填充列表视图与当前节点的所有子节点。
使用当前节点和所有父节点填充微调器。
对于 Spinner,我要么通过排序来显示层次结构,要么也通过使用管道缩进来显示层次结构。
所以我旋转器会显示:
关闭时的
当前
但选择后会显示
I think you could use this
Populate the Listview with all children of the current node.
Populate the Spinner with Current node and all parent nodes.
For the Spinner, I'd either show hierarchy through ordering, or by using pipe indenting as well.
So I the spinner would show:
Current
when closedbut when selected it would show