本文整理匯總了Java中android.support.v4.view.WindowInsetsCompat.isConsumed方法的典型用法代碼示例。如果您正苦於以下問題:Java WindowInsetsCompat.isConsumed方法的具體用法?Java WindowInsetsCompat.isConsumed怎麽用?Java WindowInsetsCompat.isConsumed使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.support.v4.view.WindowInsetsCompat
的用法示例。
在下文中一共展示了WindowInsetsCompat.isConsumed方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: dispatchApplyWindowInsetsToBehaviors
import android.support.v4.view.WindowInsetsCompat; //導入方法依賴的package包/類
private WindowInsetsCompat dispatchApplyWindowInsetsToBehaviors(WindowInsetsCompat insets) {
if (insets.isConsumed()) {
return insets;
}
for (int i = 0, z = getChildCount(); i < z; i++) {
final View child = getChildAt(i);
if (ViewCompat.getFitsSystemWindows(child)) {
final LayoutParams lp = (LayoutParams) child.getLayoutParams();
final Behavior b = lp.getBehavior();
if (b != null) {
// If the view has a behavior, let it try first
insets = b.onApplyWindowInsets(this, child, insets);
if (insets.isConsumed()) {
// If it consumed the insets, break
break;
}
}
}
}
return insets;
}
示例2: dispatchApplyWindowInsetsToBehaviors
import android.support.v4.view.WindowInsetsCompat; //導入方法依賴的package包/類
private WindowInsetsCompat dispatchApplyWindowInsetsToBehaviors(WindowInsetsCompat insets) {
if (insets.isConsumed()) {
return insets;
}
int z = getChildCount();
for (int i = 0; i < z; i++) {
View child = getChildAt(i);
if (ViewCompat.getFitsSystemWindows(child)) {
Behavior b = ((LayoutParams) child.getLayoutParams()).getBehavior();
if (b != null) {
insets = b.onApplyWindowInsets(this, child, insets);
if (insets.isConsumed()) {
break;
}
} else {
continue;
}
}
}
return insets;
}
示例3: setWindowInsets
import android.support.v4.view.WindowInsetsCompat; //導入方法依賴的package包/類
private void setWindowInsets(WindowInsetsCompat insets) {
// Invalidate the total scroll range...
mTotalScrollRange = INVALID_SCROLL_RANGE;
mLastInsets = insets;
// Now dispatch them to our children
for (int i = 0, z = getChildCount(); i < z; i++) {
final View child = getChildAt(i);
insets = ViewCompat.dispatchApplyWindowInsets(child, insets);
if (insets.isConsumed()) {
break;
}
}
}
示例4: dispatchChildApplyWindowInsets
import android.support.v4.view.WindowInsetsCompat; //導入方法依賴的package包/類
private void dispatchChildApplyWindowInsets(WindowInsetsCompat insets) {
if (insets.isConsumed()) {
return;
}
for (int i = 0, z = getChildCount(); i < z; i++) {
final View child = getChildAt(i);
if (ViewCompat.getFitsSystemWindows(child)) {
final LayoutParams lp = (LayoutParams) child.getLayoutParams();
final Behavior b = lp.getBehavior();
if (b != null) {
// If the view has a behavior, let it try first
insets = b.onApplyWindowInsets(this, child, insets);
if (insets.isConsumed()) {
// If it consumed the insets, break
break;
}
}
// Now let the view try and consume them
insets = ViewCompat.dispatchApplyWindowInsets(child, insets);
if (insets.isConsumed()) {
break;
}
}
}
}
示例5: setWindowInsets
import android.support.v4.view.WindowInsetsCompat; //導入方法依賴的package包/類
private void setWindowInsets(WindowInsetsCompat insets) {
// Now dispatch them to our children
for (int i = 0, z = getChildCount(); i < z; i++) {
final View child = getChildAt(i);
insets = ViewCompat.dispatchApplyWindowInsets(child, insets);
if (insets.isConsumed()) {
break;
}
}
}
示例6: setWindowInsets
import android.support.v4.view.WindowInsetsCompat; //導入方法依賴的package包/類
private void setWindowInsets(WindowInsetsCompat paramWindowInsetsCompat)
{
boolean bool1 = true;
int i = 0;
if (this.mLastInsets != paramWindowInsetsCompat)
{
this.mLastInsets = paramWindowInsetsCompat;
boolean bool2;
if ((paramWindowInsetsCompat != null) && (paramWindowInsetsCompat.getSystemWindowInsetTop() > 0))
{
bool2 = bool1;
this.mDrawStatusBarBackground = bool2;
if ((this.mDrawStatusBarBackground) || (getBackground() != null)) {
break label144;
}
}
for (;;)
{
setWillNotDraw(bool1);
if (paramWindowInsetsCompat.isConsumed()) {
break label149;
}
int j = getChildCount();
WindowInsetsCompat localWindowInsetsCompat = paramWindowInsetsCompat;
while (i < j)
{
View localView = getChildAt(i);
if (ViewCompat.getFitsSystemWindows(localView))
{
if ((((LayoutParams)localView.getLayoutParams()).mBehavior != null) && (localWindowInsetsCompat.isConsumed())) {
break;
}
localWindowInsetsCompat = ViewCompat.dispatchApplyWindowInsets(localView, localWindowInsetsCompat);
if (localWindowInsetsCompat.isConsumed()) {
break;
}
}
i++;
}
bool2 = false;
break;
label144:
bool1 = false;
}
label149:
requestLayout();
}
}