Question about RadioGroup and RecyclerView

62 Views Asked by At

I have the function that display a RingTone list from User's phone as a RadioGroup inside RecyclerView
The RadioGroup's size increase dynamically as the size of user's phone
Everything work perfectly except when user select a ringtone, click save and then go back again, it doesn't show the Ringtone that has been selected
How can I get the index/id of the radio button from a dynamic RadioGroup?

1

There are 1 best solutions below

0
On

on that radiobutton listener like oncheckedchangelistener get it's id and save it. After that when screen's oncreate fetch that id and set selected.

One more thing in model class set one boolean variable which define radio button checked or not.