How To Show That The Radio Button Is Selected Permanently
Solution 1:
You could save the value (when changed) to SharedPreferences, read it each time the page is loaded, and set the checked state based on that.
Solution 2:
You can use a static variable like is_ticked & set its value true/false when user tick it. and check value of this variable in onCreate() if(is_ticked) set radio button to checked else unchecked .
Solution 3:
A question with similar content was asked yesterday: I have radio button for the user to choose if he/she wants to keep his/her account logged in.
you can't solve this problem just with the layout.xml - you need to save the status of the radio button and load it again once the appropriate activity is started
Solution 4:
You could use this:
mListView.setItemChecked(selectedPosition, true);//this will check(enable) the desired radio button.
selectedPosition, you can save using SharedPreferences.
Post a Comment for "How To Show That The Radio Button Is Selected Permanently"