I have a HorizontalScrollView containing a LinearLayout. I can't seem to get the content to vertically center inside my scrollview, I can't set gravity on the horizontalscrollview, even though I tried with a LinearLayout.LayoutParams when setting the scrollview as contentview.
Can anyone help?
This is what I have:
HorizontalScrollView sv = new HorizontalScrollView(c);
LinearLayout llh = new LinearLayout(c);
llh.setOrientation(LinearLayout.HORIZONTAL);
sv.addView(llh, llh_lp)
llh_lp is just simple wrap_content params.
setContentView(sv)
And I tried adding linearlayout.layoutparams with gravity = gravity.center_vertical too, on the setContentView call.