Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3807662
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T15:01:38+00:00 2026-05-19T15:01:38+00:00

I have 3 webviews in my search engine app.When the user enters his query,

  • 0

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,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T15:01:39+00:00Added an answer on May 19, 2026 at 3:01 pm

    Accessing data from SharedPreferences:

    SharedPreferences sharedPref = getSharedPreferences("FileName",MODE_PRIVATE);
    String webViewChoice = sharedPref.getString("userChoice","null");
    

    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:

    SharedPreferences sharedPref = getSharedPreferences("FileName",MODE_PRIVATE);
    SharedPreferences.Editor prefEditor = sharedPref.edit();
    prefEditor.putString("userChoice",usersChoice);
    prefEditor.commit();
    

    I hope it helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want the user to input their search query into a search widget and
I have a view controlled app. On my xib I have no webviews but
I have a magazine Ipad app that dynamically adds/removes webviews from a scrollview to
In an application that has multiple webviews, is there any way to have the
In my project (iPhone app) I have a nice webview to allow users to
I have a Cocoa app that uses a WebView to display an HTML interface.
I am creating a application which have webviews as well as native screens.I have
I'm currently working on a cross-platform mobile app and have gone through the process
So I'm building an app that allows input from the user with their voice.
I have loaded a PDF into UIWebView. Now i want to search for strings

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.