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



For example you need to create xml layout file with ScrollView and LinearView inside.
Then in your Activity class:
and then in onClick method just:
and to add your view to main view:
I know that this is not a direct answer to your question, but maybe will help you with dynamically adding Views.