Reputation: 4635
I need to add a scroll for linear layout.I use the following code to create the linear layout.But it's not working
LinearLayout llay=new LinearLayout(context);
llay.setVerticalScrollBarEnabled(true);
If i use the following lines i will get the Scrollbar.
ScrollView sc=new ScrollView(context);
sc.addView(llay);
But I need to add scroll for the Linear layout without using ScrollView. Thanks in advance !!!
Upvotes: 1
Views: 6327
Reputation: 2835
You should use a ScrollView
. Please look at this short tutorial on how to do it:
Upvotes: 2