GeezerVison is showing github.com — 1.修改 Handler 创建方式 · ftyangjun/SmartRefreshLayout@a35ebb1
File tree
Expand file treeCollapse file tree
Open diff view settings
refresh-layout-kernel/src/main/java/com/scwang/smart/refresh/layout
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: gradle/wrapper/gradle-wrapper.properties +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME |
3 | 3 | distributionPath=wrapper/dists |
4 | 4 | zipStoreBase=GRADLE_USER_HOME |
5 | 5 | zipStorePath=wrapper/dists |
6 | | -distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip |
| 6 | +distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-bin.zip |
Collapse file
Copy file name to clipboardExpand all lines: refresh-layout-kernel/src/main/java/com/scwang/smart/refresh/layout/SmartRefreshLayout.java +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
11 | 11 | import android.graphics.Paint; |
12 | 12 | import android.os.Build; |
13 | 13 | import android.os.Handler; |
| 14 | +import android.os.Looper; |
14 | 15 | import android.support.annotation.ColorInt; |
15 | 16 | import android.support.annotation.ColorRes; |
16 | 17 | import android.support.annotation.NonNull; |
@@ -224,7 +225,7 @@ public SmartRefreshLayout(Context context, AttributeSet attrs) { |
224 | 225 |
|
225 | 226 | ViewConfiguration configuration = ViewConfiguration.get(context); |
226 | 227 |
|
227 | | - mHandler = new Handler(); |
| 228 | + mHandler = new Handler(Looper.getMainLooper()); |
228 | 229 | mScroller = new Scroller(context); |
229 | 230 | mVelocityTracker = VelocityTracker.obtain(); |
230 | 231 | mScreenHeightPixels = context.getResources().getDisplayMetrics().heightPixels; |
|