GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — 添加注释 · tao2java/SmartRefreshLayout@8ca0a90

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • refresh-layout/src/main/java/com/scwang/smartrefresh/layout
    • SmartRefreshLayout.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎refresh-layout/src/main/java/com/scwang/smartrefresh/layout/SmartRefreshLayout.java‎

Copy file name to clipboardExpand all lines: refresh-layout/src/main/java/com/scwang/smartrefresh/layout/SmartRefreshLayout.java
+7-2Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,15 +1020,20 @@ protected boolean interceptAnimator(int action) {
10201020
return false;
10211021
}
10221022

1023+
/**
1024+
* 这段代码来自谷歌官方的 SwipeRefreshLayout
1025+
* 应用场景已经在英文注释中解释清楚
1026+
* 大部分第三方下拉刷新库都保留了这段代码,本库也不例外
1027+
*/
10231028
@Override
1024-
public void requestDisallowInterceptTouchEvent(boolean b) {
1029+
public void requestDisallowInterceptTouchEvent(boolean disallowIntercept) {
10251030
// if this is a List < L or another view that doesn't support nested
10261031
// scrolling, ignore this request so that the vertical scroll event
10271032
// isn't stolen
10281033
View target = mRefreshContent.getScrollableView();
10291034
if ((android.os.Build.VERSION.SDK_INT >= 21 || !(target instanceof AbsListView))
10301035
&& (target == null || ViewCompat.isNestedScrollingEnabled(target))) {
1031-
super.requestDisallowInterceptTouchEvent(b);
1036+
super.requestDisallowInterceptTouchEvent(disallowIntercept);
10321037
//} else {
10331038
// Nope.
10341039
}

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.