I want to get the height/width of the Middle(Body) layout in onCreate() method.
My main.xml is :
I find overriding the following method prevents the width and height being 0. At this stage of the Activity all of the View's in the Activity should be inflated.
public void onWindowFocusChanged (boolean hasFocus)
{
super.onWindowFocusChanged(hasFocus);
ScrollView scrollView = (ScrollView) findViewById(R.id.svtest);
int width = scrollView.getWidth();
int height = scrollView.getHeight();
}