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