List of usage examples for android.support.v4.view WindowInsetsCompat replaceSystemWindowInsets
public WindowInsetsCompat replaceSystemWindowInsets(Rect rect)
From source file:ooo.oxo.apps.earth.widget.WindowInsetsFrameLayout.java
@TargetApi(21) private boolean applySystemWindowInsets21(WindowInsetsCompat insets) { boolean consumed = false; for (int i = 0; i < getChildCount(); i++) { View child = getChildAt(i); if (!child.getFitsSystemWindows()) { continue; }// w w w .ja v a 2 s .c o m Rect childInsets = new Rect(insets.getSystemWindowInsetLeft(), insets.getSystemWindowInsetTop(), insets.getSystemWindowInsetRight(), insets.getSystemWindowInsetBottom()); computeInsetsWithGravity(child, childInsets); ViewCompat.dispatchApplyWindowInsets(child, insets.replaceSystemWindowInsets(childInsets)); consumed = true; } return consumed; }