Saving State of the checkbox in a custom list view with Checkboxes

后端 未结 2 864
旧时难觅i
旧时难觅i 2020-12-05 22:44

I have a list view with checkboxes and I want that when user selects any check box and closes the application, and again opens the application, the same checkboxes should be

2条回答
  •  悲&欢浪女
    2020-12-05 22:50

    Declare a boolean array to record the checked state (in the setOnCheckedChangeListener()) for each position item, then call setChecked() after setOnCheckedChangeListener(). Just that simple.

提交回复
热议问题