Selecting one RadioButton value and scrolling back removing the selected one in RecyclerView

后端 未结 9 1889
温柔的废话
温柔的废话 2020-12-15 18:24

In my application am displaying 20 multiple choice questions with the help of RecyclerView.

If I change the value of first RadioGroup and s

9条回答
  •  隐瞒了意图╮
    2020-12-15 18:57

    As i have seen your code...

    just add single line

    viewHolder.rgAnswers.setOnCheckedChangeListener(null);

    in onBindViewHolder() method above of this line

    viewHolder.rgAnswers.check(stList.get(position).getSelectedRadioButtonId()); ...

    if it solved your problem ..let me know ... i will explain you a scenario why its happening .. Because i faced similer problem and solved using this solution.

提交回复
热议问题