I use
mContext.getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
mContext.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
mContext.getWindow().getDecorView().requestLayout();
to hide the status bar after setContentView.
The status bar is hided,but my view does not go to the top.There is a black rectangle
instead of the status bar.