Rect frame = new Rect();  
    getWindow().getDecorView().getWindowVisibleDisplayFrame(frame);  
    int statusBarHeight = frame.top;
发现网上都这么写的根本都不管用。
super.onCreate(savedInstanceState);
this.setContentView(R.layout.startup);
int height = ActivityUtils.getStatusBarHeight(thiz);
        public static int getStatusBarHeight(Activity context){
Rect frame = new Rect();  
context.getWindow().getDecorView()
.getWindowVisibleDisplayFrame(frame);
System.out.println("frame=="+frame);
return frame.top;
}