本文整理汇总了Java中android.support.v4.view.WindowInsetsCompat.consumeSystemWindowInsets方法的典型用法代码示例。如果您正苦于以下问题:Java WindowInsetsCompat.consumeSystemWindowInsets方法的具体用法?Java WindowInsetsCompat.consumeSystemWindowInsets怎么用?Java WindowInsetsCompat.consumeSystemWindowInsets使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.support.v4.view.WindowInsetsCompat
的用法示例。
在下文中一共展示了WindowInsetsCompat.consumeSystemWindowInsets方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setWindowInsets
import android.support.v4.view.WindowInsetsCompat; //导入方法依赖的package包/类
private WindowInsetsCompat setWindowInsets(WindowInsetsCompat insets) {
if (Build.VERSION.SDK_INT >= 21 && mWindowInsetLayoutWR.get() != null) {
if (mWindowInsetLayoutWR.get().applySystemWindowInsets21(insets)) {
return insets.consumeSystemWindowInsets();
}
}
return insets;
}
示例2: onWindowInsetChanged
import android.support.v4.view.WindowInsetsCompat; //导入方法依赖的package包/类
WindowInsetsCompat onWindowInsetChanged(final WindowInsetsCompat insets) {
WindowInsetsCompat newInsets = null;
if (ViewCompat.getFitsSystemWindows(this)) {
// If we're set to fit system windows, keep the insets
newInsets = insets;
}
// If our insets have changed, keep them and invalidate the scroll ranges...
if (!QMUILangHelper.objectEquals(mLastInsets, newInsets)) {
mLastInsets = newInsets;
requestLayout();
}
// Consume the insets. This is done so that child views with fitSystemWindows=true do not
// get the default padding functionality from View
return insets.consumeSystemWindowInsets();
}
示例3: onWindowInsetChanged
import android.support.v4.view.WindowInsetsCompat; //导入方法依赖的package包/类
WindowInsetsCompat onWindowInsetChanged(final WindowInsetsCompat insets) {
WindowInsetsCompat newInsets = null;
if (ViewCompat.getFitsSystemWindows(this)) {
// If we're set to fit system windows, keep the insets
newInsets = insets;
}
// If our insets have changed, keep them and invalidate the scroll ranges...
if (!ObjectsCompat.equals(lastInsets, newInsets)) {
lastInsets = newInsets;
requestLayout();
}
// Consume the insets. This is done so that child views with fitSystemWindows=true do not
// get the default padding functionality from View
return insets.consumeSystemWindowInsets();
}
开发者ID:material-components,项目名称:material-components-android,代码行数:19,代码来源:CollapsingToolbarLayout.java
示例4: onWindowInsetChanged
import android.support.v4.view.WindowInsetsCompat; //导入方法依赖的package包/类
WindowInsetsCompat onWindowInsetChanged(final WindowInsetsCompat insets) {
WindowInsetsCompat newInsets = null;
if (ViewCompat.getFitsSystemWindows(this)) {
// If we're set to fit system windows, keep the insets
newInsets = insets;
}
// If our insets have changed, keep them and invalidate the scroll ranges...
if (!ObjectsCompat.equals(mLastInsets, newInsets)) {
mLastInsets = newInsets;
requestLayout();
}
// Consume the insets. This is done so that child views with fitSystemWindows=true do not
// get the default padding functionality from View
return insets.consumeSystemWindowInsets();
}
示例5: onWindowInsetChanged
import android.support.v4.view.WindowInsetsCompat; //导入方法依赖的package包/类
WindowInsetsCompat onWindowInsetChanged(final WindowInsetsCompat insets) {
WindowInsetsCompat newInsets = null;
if (ViewCompat.getFitsSystemWindows(this)) {
// If we're set to fit system windows, keep the insets
newInsets = insets;
}
// If our insets have changed, keep them and invalidate the scroll ranges...
if (!objectEquals(mLastInsets, newInsets)) {
mLastInsets = newInsets;
requestLayout();
}
// Consume the insets. This is done so that child views with fitSystemWindows=true do not
// get the default padding functionality from View
return insets.consumeSystemWindowInsets();
}
示例6: setWindowInsets
import android.support.v4.view.WindowInsetsCompat; //导入方法依赖的package包/类
private WindowInsetsCompat setWindowInsets(WindowInsetsCompat insets) {
if (this.mLastInsets != insets) {
this.mLastInsets = insets;
requestLayout();
}
return insets.consumeSystemWindowInsets();
}
示例7: setWindowInsets
import android.support.v4.view.WindowInsetsCompat; //导入方法依赖的package包/类
private WindowInsetsCompat setWindowInsets(WindowInsetsCompat insets) {
if (Build.VERSION.SDK_INT >= 21) {
if (applySystemWindowInsets21(insets)) {
return insets.consumeSystemWindowInsets();
}
}
return insets;
}
示例8: setWindowInsets
import android.support.v4.view.WindowInsetsCompat; //导入方法依赖的package包/类
private WindowInsetsCompat setWindowInsets(WindowInsetsCompat insets) {
if (mLastInsets != insets) {
mLastInsets = insets;
requestLayout();
}
return insets.consumeSystemWindowInsets();
}
示例9: onApplyWindowInsets
import android.support.v4.view.WindowInsetsCompat; //导入方法依赖的package包/类
@Override
public WindowInsetsCompat onApplyWindowInsets(View v, WindowInsetsCompat insets) {
setWindowInsets(insets);
return insets.consumeSystemWindowInsets();
}
示例10: onApplyWindowInsets
import android.support.v4.view.WindowInsetsCompat; //导入方法依赖的package包/类
public WindowInsetsCompat onApplyWindowInsets(View v, WindowInsetsCompat insets) {
DrawStatusLinearLayout.this.setWindowInsets(insets);
return insets.consumeSystemWindowInsets();
}
示例11: onApplyWindowInsets
import android.support.v4.view.WindowInsetsCompat; //导入方法依赖的package包/类
public WindowInsetsCompat onApplyWindowInsets(View v, WindowInsetsCompat insets) {
DrawStatusRelativeLayout.this.setWindowInsets(insets);
return insets.consumeSystemWindowInsets();
}