`There is an app in which user will provide quantity of cupcake using edit text and in next fragment, I want to give choice of flavor selection of all cupcakes using Radio group button, that buttons will generate from one recycler view. Store all selected flavors in view Model. in short, I want choice selection like MCQ exam app.
detail fragment in which user input their name and quantity of cupcake
now I want to store user choices in view model in mutable live data
You can read more about how to implement click listeners in adapter here.
Sample code :
In your adapter implement interfaces for each of your radio button
Set these click listeners to your appropriate radio buttons in your adapter
onBindViewHolderImplement your interface methods in your fragment