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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:58:09+00:00 2026-06-04T07:58:09+00:00

i want to add Layout Dynamically on Add button click and on Dynamic Layout

  • 0

i want to add Layout Dynamically on Add button click and on Dynamic Layout show Datepicker,Timepicker Dialog and set value in given Edit Text. show in image on Date Click set Date Right side . Here problem Start when Add Second Same layout and set date it set only on newly created layout

i

enter image description here

enter image description here

  • 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-04T07:58:11+00:00Added an answer on June 4, 2026 at 7:58 am

    For example you need to create xml layout file with ScrollView and LinearView inside.
    Then in your Activity class:

       LayoutInflater inflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
       View main = inflater.inflate(R.layout.your_layout, null);
       setContentView(main);
    
       LinearLayout linear = (LinearLayout)main.findViewById(R.id.linear_layout);
    

    and then in onClick method just:

    View yourView = inflater.inflate(R.layout.yourView, null);
    // Do whatever you want with your View, set up some variables etc.
    

    and to add your view to main view:

    linear.addView(yourView);
    

    I know that this is not a direct answer to your question, but maybe will help you with dynamically adding Views.

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

Sidebar

Related Questions

I want to add multiple new JTextArea in JTextPane at runtime on button click.
i want to add listener to a jlist. but items are added dynamically to
I am facing the following problem: I want to add dynamically a mobile site
I want to add views circularly and also dynamically according to the phone resolution
I'm trying to create a buttons dynamically and add them to table layout panel
I want to add rows to a tablelayout dynamically. This is my code. TableRow
I have a ViewFlipper in which I want to add Views (Relative Layout with
Hello i have a canvas with the name Layout. I want to add some
I want to add programatically 4 children to dijit.layout.AccordionContainer . The script runs with
I have a panel with a vbox layout. I want to add a panel

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.