当前位置: 首页>>代码示例>>Java>>正文


Java ViewCompat.isNestedScrollingEnabled方法代码示例

本文整理汇总了Java中android.support.v4.view.ViewCompat.isNestedScrollingEnabled方法的典型用法代码示例。如果您正苦于以下问题:Java ViewCompat.isNestedScrollingEnabled方法的具体用法?Java ViewCompat.isNestedScrollingEnabled怎么用?Java ViewCompat.isNestedScrollingEnabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.support.v4.view.ViewCompat的用法示例。


在下文中一共展示了ViewCompat.isNestedScrollingEnabled方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: findScrollingChild

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@VisibleForTesting
  View findScrollingChild(View view) {
      if (ViewCompat.isNestedScrollingEnabled(view)) {
    return view;
  }
  if (view instanceof ViewGroup) {
    ViewGroup group = (ViewGroup) view;
    for (int i = 0, count = group.getChildCount(); i < count; i++) {
      View scrollingChild = findScrollingChild(group.getChildAt(i));
      if (scrollingChild != null) {
        return scrollingChild;
      }
    }
  }
  return null;
}
 
开发者ID:commonsguy,项目名称:cwac-crossport,代码行数:17,代码来源:BottomSheetBehavior.java

示例2: requestDisallowInterceptTouchEvent

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
public void requestDisallowInterceptTouchEvent(boolean b) {
    // if this is a List < L or another view that doesn't support nested
    // scrolling, ignore this request so that the vertical scroll event
    // isn't stolen
    View target = mRefreshContent.getScrollableView();
    if ((android.os.Build.VERSION.SDK_INT >= 21 || !(target instanceof AbsListView))
            && (target == null || ViewCompat.isNestedScrollingEnabled(target))) {
        super.requestDisallowInterceptTouchEvent(b);
        //} else {
        // Nope.
    }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:14,代码来源:SmartRefreshLayout.java

示例3: requestDisallowInterceptTouchEvent

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
/**
 * 这段代码来自谷歌官方的 SwipeRefreshLayout
 * 应用场景已经在英文注释中解释清楚
 * 大部分第三方下拉刷新库都保留了这段代码,本库也不例外
 */
@Override
public void requestDisallowInterceptTouchEvent(boolean disallowIntercept) {
    // if this is a List < L or another view that doesn't support nested
    // scrolling, ignore this request so that the vertical scroll event
    // isn't stolen
    View target = mRefreshContent.getScrollableView();
    if ((android.os.Build.VERSION.SDK_INT >= 21 || !(target instanceof AbsListView))
            && (target == null || ViewCompat.isNestedScrollingEnabled(target))) {
        super.requestDisallowInterceptTouchEvent(disallowIntercept);
        //} else {
        // Nope.
    }
}
 
开发者ID:penghuanliang,项目名称:Rxjava2.0Demo,代码行数:19,代码来源:SmartRefreshLayout.java

示例4: requestDisallowInterceptTouchEvent

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
public void requestDisallowInterceptTouchEvent(boolean b) {
    // if this is a List < L or another view that doesn't support nested
    // scrolling, ignore this request so that the vertical scroll event
    // isn't stolen
    if ((android.os.Build.VERSION.SDK_INT < 21 && mTargetView instanceof AbsListView)
            || (mTargetView != null && !ViewCompat.isNestedScrollingEnabled(mTargetView))) {
        // Nope.
    } else {
        super.requestDisallowInterceptTouchEvent(b);
    }
}
 
开发者ID:coopese,项目名称:qmui,代码行数:13,代码来源:QMUIPullRefreshLayout.java

示例5: requestDisallowInterceptTouchEvent

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
public void requestDisallowInterceptTouchEvent(boolean b) {
    // if this is a List < L or another view that doesn't support nested
    // scrolling, ignore this request so that the vertical scroll event
    // isn't stolen
    if ((android.os.Build.VERSION.SDK_INT < 21 && mTarget instanceof AbsListView)
            || (mTarget != null && !ViewCompat.isNestedScrollingEnabled(mTarget))) {
        // Nope.
    } else {
        super.requestDisallowInterceptTouchEvent(b);
    }
}
 
开发者ID:yangjiantao,项目名称:AndroidUiKit,代码行数:13,代码来源:ISwipeRefreshLayout.java

示例6: requestDisallowInterceptTouchEvent

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
public void requestDisallowInterceptTouchEvent(boolean b) {
    // if this is a List < L or another view that doesn't support nested
    // scrolling, ignore this request so that the vertical scroll event
    // isn't stolen
    View target = mRefreshContent.getScrollableView();
    if ((android.os.Build.VERSION.SDK_INT >= 21 || !(target instanceof AbsListView))
            && (target == null || ViewCompat.isNestedScrollingEnabled(target))) {
                super.requestDisallowInterceptTouchEvent(b);
            //} else {
        // Nope.
    }
}
 
开发者ID:Brave-wan,项目名称:SmartRefresh,代码行数:14,代码来源:SmartRefreshLayout.java

示例7: requestDisallowInterceptTouchEvent

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
public void requestDisallowInterceptTouchEvent(boolean b) {
    if (VERSION.SDK_INT < 21 && (this.mTarget instanceof AbsListView)) {
        return;
    }
    if (this.mTarget == null || ViewCompat.isNestedScrollingEnabled(this.mTarget)) {
        super.requestDisallowInterceptTouchEvent(b);
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:9,代码来源:SwipeRefreshLayout.java

示例8: requestDisallowInterceptTouchEvent

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
public void requestDisallowInterceptTouchEvent(boolean b) {
    // if this is a List < L or another view that doesn't support nested
    // scrolling, ignore this request so that the vertical scroll event
    // isn't stolen
    //noinspection StatementWithEmptyBody
    if ((android.os.Build.VERSION.SDK_INT < 21 && mTargetView instanceof AbsListView)
            || (mTargetView != null && !ViewCompat.isNestedScrollingEnabled(mTargetView))) {
        // Nope.
    } else {
        super.requestDisallowInterceptTouchEvent(b);
    }
}
 
开发者ID:QMUI,项目名称:QMUI_Android,代码行数:14,代码来源:QMUIPullRefreshLayout.java

示例9: requestDisallowInterceptTouchEvent

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
public void requestDisallowInterceptTouchEvent(boolean disallowIntercept) {
    // if this is a List < L or another view that doesn't support nested
    // scrolling, ignore this request so that the vertical scroll event
    // isn't stolen
    if ((android.os.Build.VERSION.SDK_INT < 21 && mTarget instanceof AbsListView)
            || (mTarget != null && !ViewCompat.isNestedScrollingEnabled(mTarget))) {
        // Nope.
    } else {
        super.requestDisallowInterceptTouchEvent(disallowIntercept);
    }
}
 
开发者ID:Bvin,项目名称:gesture-refresh-layout,代码行数:13,代码来源:GestureRefreshLayout.java

示例10: requestDisallowInterceptTouchEvent

import android.support.v4.view.ViewCompat; //导入方法依赖的package包/类
@Override
public void requestDisallowInterceptTouchEvent(boolean disallowIntercept) {
    if (mContentView != null && ((android.os.Build.VERSION.SDK_INT < 21 && mContentView instanceof AbsListView)
            || !ViewCompat.isNestedScrollingEnabled(mContentView))) {
        // Nope.
    } else {
        super.requestDisallowInterceptTouchEvent(disallowIntercept);
    }
}
 
开发者ID:Sunzxyong,项目名称:PullToLoad,代码行数:10,代码来源:PullToRefreshLayout.java


注:本文中的android.support.v4.view.ViewCompat.isNestedScrollingEnabled方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。