當前位置: 首頁>>代碼示例>>Java>>正文


Java WindowInsetsCompat.consumeSystemWindowInsets方法代碼示例

本文整理匯總了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;
}
 
開發者ID:coopese,項目名稱:qmui,代碼行數:9,代碼來源:QMUIWindowInsetHelper.java

示例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();
}
 
開發者ID:coopese,項目名稱:qmui,代碼行數:19,代碼來源:QMUICollapsingTopBarLayout.java

示例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();
}
 
開發者ID:opacapp,項目名稱:multiline-collapsingtoolbar,代碼行數:19,代碼來源:CollapsingToolbarLayout.java

示例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();
}
 
開發者ID:google,項目名稱:iosched,代碼行數:19,代碼來源:CollapsingToolbarLayout.java

示例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();
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:8,代碼來源:CollapsingToolbarLayout.java

示例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;
}
 
開發者ID:QMUI,項目名稱:QMUI_Android,代碼行數:9,代碼來源:QMUICollapsingTopBarLayout.java

示例8: setWindowInsets

import android.support.v4.view.WindowInsetsCompat; //導入方法依賴的package包/類
private WindowInsetsCompat setWindowInsets(WindowInsetsCompat insets) {
    if (mLastInsets != insets) {
        mLastInsets = insets;
        requestLayout();
    }
    return insets.consumeSystemWindowInsets();
}
 
開發者ID:VyacheslavShmakin,項目名稱:GpCollapsingToolbar,代碼行數:8,代碼來源:GpCollapsingToolbar.java

示例9: onApplyWindowInsets

import android.support.v4.view.WindowInsetsCompat; //導入方法依賴的package包/類
@Override
public WindowInsetsCompat onApplyWindowInsets(View v, WindowInsetsCompat insets) {
    setWindowInsets(insets);
    return insets.consumeSystemWindowInsets();
}
 
開發者ID:mobvoi,項目名稱:ticdesign,代碼行數:6,代碼來源:CoordinatorLayout.java

示例10: onApplyWindowInsets

import android.support.v4.view.WindowInsetsCompat; //導入方法依賴的package包/類
public WindowInsetsCompat onApplyWindowInsets(View v, WindowInsetsCompat insets) {
    DrawStatusLinearLayout.this.setWindowInsets(insets);
    return insets.consumeSystemWindowInsets();
}
 
開發者ID:brucewuu520,項目名稱:Qianlichuanyin,代碼行數:5,代碼來源:DrawStatusLinearLayout.java

示例11: onApplyWindowInsets

import android.support.v4.view.WindowInsetsCompat; //導入方法依賴的package包/類
public WindowInsetsCompat onApplyWindowInsets(View v, WindowInsetsCompat insets) {
    DrawStatusRelativeLayout.this.setWindowInsets(insets);
    return insets.consumeSystemWindowInsets();
}
 
開發者ID:brucewuu520,項目名稱:Qianlichuanyin,代碼行數:5,代碼來源:DrawStatusRelativeLayout.java


注:本文中的android.support.v4.view.WindowInsetsCompat.consumeSystemWindowInsets方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。