sir a need to add a layout to another layout on click of a button.
Is it possible how.
Example here: How to lay out Views in RelativeLayout programmatically?
It is. Add this code to the onClickListener of your button:
LinearLayout layout = new LinearLayout(...);
// init this layout here
RelativeLayout parentLayout = (RelativeLayout) findViewById(R.id.myLayout);
parentLayout.addView(layout);