I have an application with a tab activity. The activity hosts 2 activities with a list of items. I have implemented checkboxes to each of the items also. On orientation change, I have set the tab activity to be oriented to the left hand side of the screen. ie. the tab activity and the child activity are recreated. If i press the menu button to display the check boxes and checks a few items and if the orientation is changed, the checked items will not be shown in the check boxes. I handled the display of checkboxes while orientation change using the SharedPreferences.
I am putting the checked items to an arraylist. the arraylist cannot be transacted through the SharedPrefereces.
I want the checked items to remain checked on orientation change.
Does anyone have any clue?
You may store this arraylist in the host Activity through a interface like this: Custom event listener on Android app . But if there aren't so many checkboxes I would divide arraylist into simple kay-value preferences and store them as a Shared Preferences.