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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:17:26+00:00 2026-05-24T21:17:26+00:00

i added Edit Text dynamically but not get values ,get values for last Edit

  • 0

i added Edit Text dynamically but not get values ,get values for last Edit Text .
please help me…

  • 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-24T21:17:27+00:00Added an answer on May 24, 2026 at 9:17 pm
    public class EnterText extends Activity {
    
        Button btnMyLine,btnSave;
        LinearLayout LLEnterText;       
        int _intMyLineCount;
    
         private List<EditText> editTextList = new ArrayList<EditText>();
         private List<TextView> textviewList=new ArrayList<TextView>();
         private List<LinearLayout> linearlayoutList=new ArrayList<LinearLayout>();
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.entertext);
    
    
    
            LLEnterText=(LinearLayout) findViewById(R.id.LlTitle);
    
            //LLEnterText.setOrientation(LinearLayout.VERTICAL);
            btnMyLine=(Button) findViewById(R.id.btnMyLines);       
            btnSave=(Button) findViewById(R.id.btnSave);
    
    
            btnMyLine.setOnClickListener(new OnClickListener() {        
                @Override
                public void onClick(View v) {                       
                        LLEnterText.addView(linearlayout(_intMyLineCount));
                        _intMyLineCount++;
                    }
            });     
    
        btnSave.setOnClickListener(new OnClickListener() {      
                @Override
                public void onClick(View v) {   
                    if (ETTitleEnterText.getText().length() == 0)
                    {
                        Toast.makeText(EnterText.this, "Please Enter Full Details", Toast.LENGTH_LONG).show();
                    }else{
    
                            for (EditText editText : editTextList) {                            
                                StartTabHost.VARClass._ArrLinesDetails.add(editText.getText().toString());
                            }   
                            for(TextView textview:textviewList){
                                StartTabHost.VARClass._ArrLinesTitle.add(textview.getText().toString());
                            }
                            for(int i=0;i<StartTabHost.VARClass._ArrLinesTitle.size();i++)
                        {
                        Log.d("LinesTitle",StartTabHost.VARClass._ArrLinesTitle.get(i));
                        Log.d("LinesDetails",StartTabHost.VARClass._ArrLinesDetails.get(i));
                        }               
    
                    }
    
                }
            });
        }
    
    private EditText editText(int _intID) {
                EditText editText = new EditText(this);
                editText.setId(_intID);
                editText.setHint("My lines");
                editText.setWidth(180);         
                editText.setBackgroundColor(Color.WHITE);
                editTextList.add(editText);
                return editText;
            }
        private TextView textView(int _intID)
        {
            TextView txtviewAll=new TextView(this);
            txtviewAll.setId(_intID);
            txtviewAll.setText("My lines:");        
            txtviewAll.setTextColor(Color.RED);
            txtviewAll.setTypeface(Typeface.DEFAULT_BOLD);
            textviewList.add(txtviewAll);
            return txtviewAll;
        }
        private LinearLayout linearlayout(int _intID)
        {
            LinearLayout LLMain=new LinearLayout(this);
            LLMain.setId(_intID);       
            LLMain.addView(textView(_intID));
            LLMain.addView(editText(_intID));
            LLMain.setOrientation(LinearLayout.HORIZONTAL);
            linearlayoutList.add(LLMain);
            return LLMain;
    
        }   
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Edit: You can get the full source here: http://pastebin.com/m26693 Edit again: I added some
How to get ID of Views that are added dynamically in layout? public class
I have an edit text meant for searching purpose. I have added searchET.addTextChangedListener(new TextWatcher()
EDIT: Modified title and added update. UPDATE : We no longer believe this is
EDIT: I have added Slug column to address performance issues on specific record selection.
EDIT : Accepted answer points out what my issue was. I added another answer
I have a piece of code: EDIT: The _penParams are initialized as the added
in C# I'd like to invoke the label edit of a newly added item
I'm trying to get my current program to take information from a dynamically created
So I just created a textbox with JavaScript like this: EDIT: Added the len

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.