expandable-spinner : How to implement expandable spinner entry in Android

与世无争的帅哥 提交于 2019-12-10 10:16:55

问题


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.

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 how Windows Program menu works).

Here's and image of what it must look like -

Consider the drop down as a spinner.

I figured out these many ways -

  1. Implementing Spinner of Spinners.
  2. Populating new spinner on every item-selected.

I am confused, as which method is efficient and easy to maintain.

Please help me get a solution. Thanks in advance.


回答1:


You could look at this answer and extend that to multiple ListPopupWindows in some way.

https://stackoverflow.com/a/16858218/1083313



来源:https://stackoverflow.com/questions/16828938/expandable-spinner-how-to-implement-expandable-spinner-entry-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!