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 8588463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:48:30+00:00 2026-06-11T22:48:30+00:00

I have some Shared Preferences in my application defined in an XML file. They

  • 0

I have some Shared Preferences in my application defined in an XML file. They are EditTextPreferences. I want to display the existing values on the Preference screen so that the user doesn’t have to enter the Preference Edit Dialog to see the current value of the Preference. The defaultValue is only visible in the Dialog screen. I want to see the defaultValue in the main preferences screen – maybe in the place of android:summary. How can I do this?

<EditTextPreference
  android:key="PREF_LT_500"
  android:title="Step 1"
  android:summary="I dont want a summary - I want to show current value"
  android:inputType="numberDecimal" 
  android:defaultValue="0.8952"
  android:dialogTitle="Enter Blah " />

Thanks in advance

  • 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-06-11T22:48:31+00:00Added an answer on June 11, 2026 at 10:48 pm

    You could try:

    yourPrefrence.getText();
    

    Or a more generic solution:

    SharedPreferences p = PreferenceManager.getDefaultSharedPreferences(this);
    
    String ans = p.getString(keyStr, defaultValue);
    

    When this is a Context, keyStr is the key & defaultValue is a default value in case the key is not found (usually “”)

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

Sidebar

Related Questions

I have an application that doesn't use databases but it has some shared preferences
I have some shared code I want to reuse in my Xcode projects. The
I have a big project compiled into libProject.so-file (shared library), I made some modules
I have been able to successfully implement Shared Preferences into my application but I
I just have some basic questions about the way shared preferences work with Android:
In my application I have a config.xml file which is being parsed,. In this
I have some code shared among multiple projects in a static library. Even with
I have some projects on bzr code repositories shared with colleagues. Problem is, I
I have a shared site in sharepoint and have some RSS feed webpart in
I have some auto-generated HTML code. When I add a float:left; on the shared

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.