Hi I am trying to make a layout dynamically and it should be scrollable because I will not know how many text fields and edit text fields I should draw. The picture is shown below.
LinearLayout layout=new LinearLayout(this);
layout.setOrientation(LinearLayout.VERTICAL);
layout.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
setContentView(layout);
Enclose your parent layout (LinearLayout or RelativeLayout) in a
ScrollView. Thats all you need to fix this.