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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T16:48:31+00:00 2026-05-20T16:48:31+00:00

I apologize if I’m just missing the obvious. I’m fairly new to Android development,

  • 0

I apologize if I’m just missing the obvious. I’m fairly new to Android development, and while I searched for this particular topic, I wasn’t exactly sure what to look for (in terms of a “name”).

In an application I’m writing, I have a section where the user can enter the names of players. However, this can range anywhere from 1 to whatever, no limit. However, I’m not sure what the best approach for this kind of feature is, or if there’s a component that already does something like it.

Basically, the functionality I’m looking for is similar to what you can see in the Edit Contact screen of the phone book; for the phone numbers and email addresses, you can push a little plus button to add a new number/address, or hit the little minus button to remove a number/address.

I can think of several ways to potentially implement this, but in the end I think wrapping it in a custom component would be best (so that you could call “Get Players” and have it return a list of strings by going through each of the inputs and getting the values).

Am I just overthinking this? Is there a component that does that already? Is there some example code that demonstrates a good way to do this?

Thanks!

  • 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-20T16:48:32+00:00Added an answer on May 20, 2026 at 4:48 pm

    After playing around with some ideas, I came across a solution that I think will suit what I’m doing. I created a custom component extending LinearLayout. As part of the creation of the component, it creates a row that says “Add new…” with a plus-sign button. Pressing the plus sign button then creates a new row containing an EditText and a minus-button which will remove the row.

    I then created a method for this component called getTexts() which returns a List that has all the non-empty Text values from all the components. Testing it in a dummy app, it seemed to work fine.

    I think I need to make tweaks to make it more robust (like the ability to add rows programatically, listeners to alert other components when a row is added/removed, and the ability to set the individual EditText values, for instance), but this functions as I imagined.

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

Sidebar

Related Questions

I apologize if this is slightly off-topic. I'm hoping to find a software-as-a-service CRM
First off, I apologize if this doesn't make sense. I'm new to XHTML, CSS
I apologize if this seems slightly off-topic, it's more a technical/installation question than it
I am new to R so I apologize if this is easy and straight
I apologize in advance if this question seems remedial. Which would be considered more
Let me apologize in advance for the simplicity of this question (I heard Jeff's
First and foremost, I apologize for any vagueness in this question. At this point,
I'm sure this has already been asked and answered so I apologize in advance
I apologize for the newbie question, but I am struggling with this problem. I
I apologize. This is part rant, part question. For the rant: Dear MS developers

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.