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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:38:31+00:00 2026-06-04T10:38:31+00:00

I am trying to create a preference screen for an Android project I’m developing.

  • 0

I am trying to create a preference screen for an Android project I’m developing.

I have created a XML config file, which I’ve been using for debug, but now I want to create a more user friendly way to set the preferences for the application, and decided to go for the Preference Screen.

As part of this project, I have a RSS Feed reader, for which I want to be able to set more than one URL feed, but I can’t figure out how. What I really need is something that will let me add a new URL (or remove one) to a list of configured URLs in Preferences.

As an example, here’s the rss part of the xml I’ve been using for debug matters (fetching data):

<source type="rss">
    <active>true</active>
    <target_url>http://feeds.tsf.pt/TSF-Ultimas</target_url>
    <target_url>http://www.arcamax.com/thefunnies/garfield/rss</target_url>
</source>
  • 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-04T10:38:33+00:00Added an answer on June 4, 2026 at 10:38 am

    I nailed it. I created a new preference called AddButtonPreference, extending Preference, that basically creates a button and points its OnClickListener to the Activity that creates this preference.
    To create the list, I iterate over my target list to add EditTextPreferences to the PreferenceScreen, and after iterating them, I add the buttonPreference. Then I just implemented the onClick, to add a new EditTextPreference to that screen when clicked, and move the button to the end.

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

Sidebar

Related Questions

I'm trying to create Preference Screen with a Checkbox control. <CheckBoxPreference android:summaryOn=@string/mySummaryOn android:summaryOff=@string/mySummaryOff android:key=myCB
I am trying to create a dialog preference as follows <DialogPreference android:key=cachePref android:dialogMessage=Testing message
I have been trying for some time to create a class/series of classes that,
have been away from Android for more than a year, trying to pick up
I am trying to create a preference pane which will reside within system preferences.
I'm trying to create a preferences window. In it I have some checkbox style
I'm trying create a bot which automatically likes Facebook posts. Using Mechanize I can
Trying to create a macro which can be used for print debug messages when
I'm trying to write an android application that has two main activities: login screen
I'm trying to create a level select / high-score screen before launching a game.

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.