vendredi 3 avril 2020

Check-Button on Screen Rotate

I have a problem with a list of items, each one with a checkbox. Rotating the screen does not keep this button checked. My idea was to keep it with a viewModel and a boolean variable that in the viewModel was false and in the Fragment I have tried to change it to true in the onClick method of the checbox but it still doesn't mantain the checked state. To clarify, I am doing this on the init method of a RecyclerView function. What's wrong with this solution?




Aucun commentaire:

Enregistrer un commentaire