Android: Shared preferences not saving the state of the buttons
问题 I have a tab-host with three activities and in each activity I have buttons. On each button press I am changing the background drawable resource So now How can I save the pressed state of each button in all three child activities so that when I move from one activity to the other, the button pressed state will be reflected on moving back. first activity -> all 2 buttons pressed -> go to 2nd activity -> come back to first activity -> all buttons in first activity should be in pressed state