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

  • Home
  • SEARCH
  • 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 6149313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:25:53+00:00 2026-05-23T19:25:53+00:00

I need the inserted values in this edittext to show up after i quit

  • 0

I need the inserted values in this edittext to show up after i quit the application. I currently have it set up so it’ll set new default values if this is the first time for a user to set up the settings page but i can’t get the set values to save and load the same values. Here is my code.

            if (res.equals("555")) {
            //post the saved text
        } else if (res.equals("510")) {
            editTextname.setText("Firstname Lastname", TextView.BufferType.EDITABLE);
            editTextphone.setText("XXX-XXX-XXXX", TextView.BufferType.EDITABLE);
            editTextemail.setText("name@yourdomain.com", TextView.BufferType.EDITABLE);
            editTextaddress.setText("Street, City, State, Zip", TextView.BufferType.EDITABLE);
            //save the entered text above and show it
        }
  • 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-23T19:25:54+00:00Added an answer on May 23, 2026 at 7:25 pm

    Use SharedPreferences:

    SharedPreferences prefs = getSharedPreferences("MyPreference", MODE_PRIVATE);
    
    // On first run:
    SharedPreferences.Editor editor = prefs.edit();
    if(!prefs.contains("key1"))
        editor.putString("key1", "defaultValue1");
    if(!prefs.contains("key2"))
        editor.putString("key2", "defaultValue2");
    editor.commit();
    
    // On save:
    SharedPreferences.Editor editor = prefs.edit();
    editor.putString("key1", "value1");
    editor.putString("key2", "value3");
    editor.commit();
    
    // On read:
    String value1 = prefs.getString("key1");
    String value2 = prefs.getString("key2");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table into which new data is frequently inserted. I need to
I currently have a table in MySQL that stores values normally, but I want
I need a little heads up on the mistake I have made on this
This example is simplified. I have the following design: http://img835.imageshack.us/i/designyi.jpg/ I have inserted test
In sqLite,i have 3 values inserted in a table in my database ,from an
I have a set of objects (stored in a linkedlist) that need to be
I need to get the last inserted id of table that have multi-column primary
I need to be able to determine the order which rows have been inserted
I need to write a trigger that rounds a value whenever it is inserted/updated
need ask you about some help. I have web app running in Net 2.0.

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.