简体   繁体   English

如何设置选中的单选按钮状态。 不使用广播组

[英]How to set checked radio button state . not using radio group

I have 2 fragments - Fragment A and Fragment B. In Fragment RadioButton is set on RecyclerView. 我有2个片段-片段A和片段B。在片段RadioButton设置在RecyclerView上。 When I have click on radio button and then go to Fragment B. After that when we move again on Fragment A then radio button is showing Unselected. 当我单击单选按钮,然后转到片段B。之后,当我们再次在片段A上移动时,单选按钮显示未选中。 I am not usin Radio Group. 我不是广播集团的成员。 thanks. 谢谢。

radioButton.isChecked();
radioButton.setChecked(true/false);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM