LinearLayout ol = new LinearLayout(this);
ol.setOrientation(LinearLayout.VERTICAL);
ol.setPadding(5, 5, 5, 5);
ol.setScrollContainer(true);
ol.setVerticalScrollBarEnabled(true);
ol.setBackgroundColor(Color.WHITE);
ol.addView(createHeader());
This is the code I used, which is inside a function to display the details. The details below this page are not visible.
Kindly help me out on how to enable the scroll using the java code.
I have not used any code in main.xml for the layout.
You can do this by creating ScrollView object and then adding your linearlayout in this scrollView object.