expandable-spinner:如何在Android中实现可扩展的Spinner条目 [英] expandable-spinner : How to implement expandable spinner entry in Android

查看:128
本文介绍了expandable-spinner:如何在Android中实现可扩展的Spinner条目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个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 how Windows Program menu works).

以下是它的外观和图像-

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

将下拉列表视为微调框.

Consider the drop down as a spinner.

我想出了很多方法-

  1. 实施微调程序的微调程序.
  2. 在每个选定的项目上填充新的微调器.

我很困惑,因为哪种方法有效且易于维护.

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条目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆