When I use a RelativeLayout
with either fill_parent
or wrap_content
as height and an element which specifies: android:layout_alignPa
My hack for this andriod bug:
ViewGroup.LayoutParams lp=(ViewGroup.LayoutParams)view.getLayoutParams();
lp.height=view.getContentHeight();//hack for android bug about ViewGroup.LayoutParams.WRAP_CONTENT and android:layout_alignParentBottom="true" on landscape orientation
view.requestLayout();
act.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);