问题描述
我正在构建一个Android应用程序,其中有一个微调项目.微调框条目是一个类别,每个类别中都有子类别.
I am building an Android application, in which i've a spinner item. The spinner entry is a category, and there are sub category in each category.
我想实现一个UI,这样,当我单击微调器条目时,我必须获得另一个微调器,以显示该类别的子类别. (有点像Windows程序菜单有效).
I want to implement a UI, such that, when i click a spinner entry, i must get another spinner, showing the sub-categories for that category. (Something like howWindows Program menu works).
以下是它的外观和图像-
Here's and image of what it must look like -
将下拉列表视为微调框.
Consider the drop down as a spinner.
我想出了很多方法-
- 实施微调程序的微调程序.
- 在每个选定的项目上填充新的微调器.
我很困惑,因为哪种方法有效且易于维护.
I am confused, as which method is efficient and easy to maintain.
请帮助我找到解决方案.预先感谢.
Please help me get a solution. Thanks in advance.
推荐答案
您可以查看此答案,并以某种方式将其扩展到多个ListPopupWindows.
You could look at this answer and extend that to multiple ListPopupWindows in some way.
https://stackoverflow.com/a/16858218/1083313
这篇关于expandable-spinner:如何在Android中实现可扩展的Spinner条目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!