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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:26:40+00:00 2026-06-04T01:26:40+00:00

Here is my image How can i add a new layout PROGRAMATICALLY(with a button

  • 0

Here is my image

Here is my image

enter image description here

How can i add a new layout PROGRAMATICALLY(with a button and an EditText)on CLICK of a ‘+’ button and set a unique id for each child(like in the pic).

  • 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-04T01:26:41+00:00Added an answer on June 4, 2026 at 1:26 am
    private Button buttonItemArray[] = new Button[50];
    private EditText edtValueArray[] = new EditText[50];
    
    
                int itemId = itemCounter;
                int valueId = valueCounter;
    
                LinearLayout linearLayout = new LinearLayout(
                        getApplicationContext());
                linearLayout.setOrientation(0);
    
                buttonItemArray[j] = new Button(NewVendorDetailActivity.this);
                buttonItemArray[j].setLayoutParams(edtName.getLayoutParams());
                buttonItemArray[j].setId(itemId);
                buttonItemArray[j].setText(name);
    
                        edtValueArray[j] = new EditText(NewVendorDetailActivity.this);
            edtValueArray[j].setLayoutParams(edtName.getLayoutParams());
            edtValueArray[j].setId(valueId);
               edtValueArray[j].setBackgroundResource(android.R.drawable.editbox_background_normal);
            edtValueArray[j].setSingleLine(true);
            edtValueArray[j].setText(value);
    
            linearLayout.addView(txtItemArray[j]);
            linearLayout.addView(edtValueArray[j]);
    
    
    
                layout.addView(linearLayout);
                itemCounter++;
                valueCounter++;
                j++;
    

    try this type add button custom ……….

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

Sidebar

Related Questions

Here's an image: I would like to know how i can set the black
I have a div that contains 3 fields You can see the image here
![enter image description here][1]On my two demo and screenshot, you can understand that so
here is the sample: http://jsfiddle.net/Zg55k/ How can I change css background image and color
HI Guys, Here I am having problem that How can I post an image
On several phones like a Nexus or a HTC phone you can add a
I want to add a new image view at the location where user touch
How can I add a new object item to a Main Views model that
I would like to open an Image, in ImageView, from a button press. I
Can anyone help me with this error? alt text http://abbeylegal.com/downloads/parsererror.jpg full image here It

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.