I have 3 webviews in my search engine app.When the user enters his query, by default he gets Google results, followed by yahoo and Ask buttons at the bottom, on clicking either of them, he gets results for that query from those sites. Now I want to give the user the privilege to change the default result site. I have created 3 radiobuttons. Upon confirmation, say he chooses Yahoo, how can i set it as Yahoo till the next time he changes it to some other site,
Share
Accessing data from SharedPreferences:
if no choice was saved (in the case when the application is running for the first time), you’ll get “null” in
webViewChoice.use this condition as you wish
Saving data in SharedPreferences:
I hope it helps.