Get the array of RadioButtons in a RadioGroup in Android(获取 Android 中 RadioGroup 中的 RadioButtons 数组)
问题描述
有没有办法在 Android RadioGroup
中获取 RadioButton
的数组(或集合)?我想将单个侦听器添加到单选按钮,但我没有看到任何明显的迭代它们的方法.
Is there any way of getting an array (or a collection) of the RadioButton
s in an Android RadioGroup
? I would like to add individual listeners to radio buttons but I don't see any obvious way of iterating over them.
推荐答案
这应该可以解决问题:
这篇关于获取 Android 中 RadioGroup 中的 RadioButtons 数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!