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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:22:07+00:00 2026-05-15T14:22:07+00:00

I would like to allow the user to enter (a non-predetermined amount of) values

  • 0

I would like to allow the user to enter (a non-predetermined amount of) values for an Android application preference. Existing examples that come to mind are the alarm clock applications found on various smartphones (iPhone, HTC Android, …) where the user can add an alarm clock time.*

Can anyone think of a simple way to present an Android user with an extensible list of editable preference values?

So far I’ve thought of:

  • Comma separated values in a simple text field.
  • Limit the user to let’s say 10 values and implement them as 10 editable preference items (EditTextPreference).
  • Make my own fancy sub-application just for these settings (although I’m not sure yet how I’d do that).

Any other ideas?

Chris

*(additional nice-to-haves along the lines of the alarm example would be: automatic ordering by value/time, a way to activate/deactivate certain values, a wheel for selecting numeric values similar to time and date selection wheels on the iPhone or Android).

  • 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-15T14:22:08+00:00Added an answer on May 15, 2026 at 2:22 pm

    I would like to allow the user to
    enter (a non-predetermined amount of)
    values for an Android application
    preference.

    Why preferences? Why not use a relational database, or your own flat file structure (e.g., JSON, CSV)?

    Existing examples that come to mind
    are the alarm clock applications found
    on various smartphones (iPhone, HTC
    Android, …) where the user can add
    an alarm clock time.*

    What is your evidence that they use preferences? The alarm clock application does not use a PreferenceActivity, for example.

    Can anyone think of a simple way to
    present an Android user with an
    extensible list of editable preference
    values?

    Use a ListView, with an option menu choice to add items. Tapping on an item brings up an editor on that item, allowing for updates (and, via an option menu choice, deletes). After all, this is what the alarm clock application does.

    automatic ordering by value/time

    Teach your ListAdapter to sort.

    a way to activate/deactivate certain
    values

    Use a ListView set for CHOICE_MODE_MULTIPLE, with a CheckedTextView. Or manage your own checkboxes (the way the alarm clock application does).

    a wheel for selecting numeric values
    similar to time and date selection
    wheels on the iPhone or Android

    There are no “time and date selection wheels” in Android. There are the time and date pickers, which use buttons, not wheels.

    You can view the source code of the alarm clock application to learn more about how it does what it does.

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

Sidebar

Related Questions

I am developing C# application and would like to allow user to enter the
I would like to create a new controller that will allow the admin user
In my app I would like to allow the user to enter a value
I would like the following regExes to allow a user to enter their email
I would like to allow the user to enter 1 or two numerical digits,
I would like to be able to allow a user to enter a custom
I've a user profile and would like allow the user update everything about himself(username,
I would like to allow the user to click within my UserControl and drag
I would like to allow a user to click on a JList and if
I'm creating a new WP theme and I would like to allow the user

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.