Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我通过使用 indexOfChild 获得了电台组中电台的位置。如何使用此索引来检查具有此特定索引的收音机?
尝试这个
radioGroup.check(((RadioButton)radioGroup.getChildAt(index)).getId())
for(i in listCategory.indices){ if((categoryRadioGroup[i] as RadioButton).isChecked) Toast.makeText(myContext, "$i", Toast.LENGTH_SHORT).show() }