I am using the new Android 4.4 flag FLAG_TRANSLUCENT_NAVIGATIONto flip the navigation bar (back, home button, etc.) at the bottom of the screen translucent. This works great, but a side effect of this is that the layout of my activity now appears below the status bar at the top of the screen (although I did not set the status bar as translucent). I want to avoid a hacker fix Ie by applying a pad to the top of the layout.
Is there a way to set the navigation as translucent, while the normal status bar is displayed normally and does NOT allow the layout to display below it?
The code I use is as follows:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
Window w = getWindow();
w.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
}
thanks