當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。