You might try setFillViewport(true), although I never got it to do
anything.
As an alternative, I would suggest always having the buttons at the
bottom, and only scrolling the rest of the view. It is not exactly
what you want, but at least you only need one of them. Something
like:
public class MyClass extends LinearLayout{
private final ScrollView viewport;
private final LinearLayout surface;
private final LinearLayout buttonPnl;
MyClass(Context context){
super(context);
setOrientation(LinearLayout.VERTICAL);
viewport = new ScrollView(context);
surface = new LinearLayout(context);
surface.setOrientation(LinearLayout.VERTICAL);
viewport.addView(surface);
addView(viewport, new LinearLayout.LayoutParams
(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT, 1f));
buttonPnl = new LinearLayout(context);
buttonPnl.setOrientation(LinearLayout.HORIZONTAL);
addView(buttonPnl, new LinearLayout.LayoutParams
(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
}
. . .
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---