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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:47:57+00:00 2026-05-14T00:47:57+00:00

My application is used on multiple platforms so it saves it preferences to a

  • 0

My application is used on multiple platforms so it saves it preferences to a file (rather than to the standard Android SharedPreferences).

Is there any easy of reusing the PreferenceActivity to save preferences to a file or is it a case of creating a whole new activity to do the job? If the latter is the case is there a layout I can use that will make the activity look like the normal preferences screen? PreferenceActivity uses com.android.internal.R.layout.preference_list_content but this doesn’t appear to be available to apps for reuse.

  • 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-14T00:47:58+00:00Added an answer on May 14, 2026 at 12:47 am

    Is there any easy of reusing the
    PreferenceActivity to save preferences
    to a file or is it a case of creating
    a whole new activity to do the job?

    Not really. I mean, you could subclass SharedPreferences, rip the guts out, and map it to your own data model, but that would be far, far worse for maintainability than just using SharedPreferences in the first place.

    If the latter is the case is there a
    layout I can use that will make the
    activity look like the normal
    preferences screen?

    It’s just a ListView. It will take you a lot more time to do this than to just use SharedPreferences.

    PreferenceActivity uses
    com.android.internal.R.layout.preference_list_content
    but this doesn’t appear to be
    available to apps for reuse.

    Sure it is. If you have the SDK installed, it’s on your hard drive right now. Look in $ANDROID_HOME/platforms/$API/data/res/layout, where $ANDROID_HOME is where you have the SDK and $API is some API (e.g., android-2.1).

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

Sidebar

Related Questions

I am working with an application that is used by multiple clients. Each client
My application is used to upload rather big files (~500mb) and some of them
I'm trying to make an application in cocos2d that can be used on multiple
I am building a web application, which can be used by multiple users simultaneously.
I have a developed a application that is gonna to be used at multiple
Is there a way to have a singleton resource used by multiple controllers? We
I am currently developing a web application which will be used by multiple clients,
Python works on multiple platforms and can be used for desktop and web applications,
I have an application which will be used by multiple companies.So my views/pages are
We are working on an application in CakePHP that will be used by multiple

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.