A glimpse of white bar when hiding status bar android (How to make it like Whatsapp status)

Home / Uncategorized / A glimpse of white bar when hiding status bar android (How to make it like Whatsapp status)

Question:
I am using following code to hide status bar,
if (Build.VERSION.SDK_INT < 16) { getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); } else { View decorView = getWindow().getDecorView(); int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN; decorView.setSystemUiVisibility(uiOptions); } It works but when the Activity starts it shows a white background at top for a couple of seconds. Is there any way to avoid that? Does anybody know how to hide it with animation (Moving upwards) like Whatsapp hides status bar when you click on Status image? If I show a ProgressDialog or AlertDialog and then dismiss it and come back to Activity then the status bar becomes visible again. How to avoid it so that status bar remains invisible always?


Answer:

Read more

Leave a Reply

Your email address will not be published. Required fields are marked *