@Override protected void onLayout(WatchShape shape, Rect screenBounds, WindowInsets screenInsets) { super.onLayout(shape, screenBounds, screenInsets); layoutView.onApplyWindowInsets(screenInsets); }
@Override protected void onLayout(WatchShape shape, Rect screenBounds, WindowInsets screenInsets) { super.onLayout(shape, screenBounds, screenInsets); layoutView.onApplyWindowInsets(screenInsets); }
@TargetApi(Build.VERSION_CODES.LOLLIPOP) @Override public WindowInsets onApplyWindowInsets(View v, WindowInsets insets) { WindowInsets defaultInsets = v.onApplyWindowInsets(insets); return defaultInsets.replaceSystemWindowInsets( defaultInsets.getSystemWindowInsetLeft(), 0, defaultInsets.getSystemWindowInsetRight(), defaultInsets.getSystemWindowInsetBottom()); } });
@Override public WindowInsets onApplyWindowInsets(View v, WindowInsets insets) { if (!insets.isRound()) { v.setPaddingRelative( (int) getResources().getDimensionPixelSize(R.dimen.content_padding_start), v.getPaddingTop(), v.getPaddingEnd(), v.getPaddingBottom()); } return v.onApplyWindowInsets(insets); } });
@Override public WindowInsets onApplyWindowInsets(View v, WindowInsets insets) { if (!insets.isRound()) { v.setPaddingRelative( (int) getResources().getDimensionPixelSize(R.dimen.content_padding_start), v.getPaddingTop(), v.getPaddingEnd(), v.getPaddingBottom()); } return v.onApplyWindowInsets(insets); } });
@Override public WindowInsets onApplyWindowInsets(View v, WindowInsets insets) { if (!insets.isRound()) { v.setPaddingRelative( (int) getResources().getDimensionPixelSize(R.dimen.content_padding_start), v.getPaddingTop(), v.getPaddingEnd(), v.getPaddingBottom()); } return v.onApplyWindowInsets(insets); } });