带有复选框项目的微调器,可能吗? [英] Spinner with checkbox items, is it possible?

查看:17
本文介绍了带有复选框项目的微调器,可能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

带有复选框项目的微调器,这可能吗?

Spinner with checkbox items, is it possible?

推荐答案

这取决于你的意思.

如果您想要一个真正的多选Spinner,那么Android 没有内置任何功能.

If you want a true multi-select Spinner, then there's nothing built into Android for that.

请注意,除了单选按钮之外,您可以控制下拉列表的 Spinner 行中的内容.如果您想在行中放置复选框,请成为我的客人.它看起来很奇怪,可能无法在触摸事件方面正常工作,不会删除单选按钮 (AFAIK),并且在正常模式下与 Spinner 的内容完全无关.因此,我不能推荐这种方法,但它是可行的.

Note that you are in control over what goes in the Spinner rows of the drop-down list, except for the radio button. If you want to put checkboxes in your rows, be my guest. It'll look strange, may not work properly with respect to touch events, will not remove the radio buttons (AFAIK), and will be completely unrelated to the Spinner's contents in normal mode. Hence, I can't recommend this approach, but it is doable.

Spinner 的源代码可以从 Android 开源项目中获得,所以欢迎你克隆它并开发一个 MultiSelectSpinner 什么的.

The source code to Spinner is available from the Android open source project, so you are welcome to clone it and develop a MultiSelectSpinner or something.

这篇关于带有复选框项目的微调器,可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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