Hello
Thanks for replies. Can anyone tell me how can i
save the background image of a page by SharedPreferences(); . I can
save the change of checkbox and radio buttons by this way
like.....................
public void onResume() {
super.onResume();
SharedPreferences settings=getPreferences(0);
//SharedPreferences settings1=getPreferences(0);
r1.setChecked(settings.getBoolean("r1_checked", false));
r2.setChecked(settings.getBoolean("r2_checked", false));
r3.setChecked(settings.getBoolean("r3_checked", false));
r4.setChecked(settings.getBoolean("r4_checked", false));
//cb1.setChecked(settings1.getBoolean("cb_checked", false));
//btn.setChecked(settings.getBoolean("cb_checked", false));
}
public void onPause() {
super.onPause();
SharedPreferences settings=getPreferences(0);
//SharedPreferences settings1=getPreferences(0);
SharedPreferences.Editor editor=settings.edit();
//SharedPreferences.Editor editor1=settings1.edit();
editor.putBoolean("r1_checked", r1.isChecked());
editor.putBoolean("r2_checked", r2.isChecked());
editor.putBoolean("r3_checked", r3.isChecked());
editor.putBoolean("r4_checked", r4.isChecked());
//editor1.putBoolean("cb1_checked", cb1.isChecked());
editor.commit();
//editor1.commit();
}
So how can i save the background image by this way?Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---