I am experimenting with the new Android 4.4 translucent navigation bars and would like to set the navigation bar as translucent using the FLAG_TRANSLUCENT_NAVIGATION>
Since api 21 there is official method for retrieving insets for status bar and navigation bar height when is translucent
ViewCompat.setOnApplyWindowInsetsListener(view, new OnApplyWindowInsetsListener() {
@Override
public WindowInsetsCompat onApplyWindowInsets(View v, WindowInsetsCompat insets) {
final int statusBar = insets.getSystemWindowInsetTop();
final int navigationBar = insets.getSystemWindowInsetBottom();
return insets;
}
});