本文整理匯總了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();
}