From 10fd69e7e6029985dc1e74c189f1ceaaaf045bcd Mon Sep 17 00:00:00 2001 From: Ztiany Date: Mon, 11 Nov 2019 18:08:02 +0800 Subject: [PATCH] update SwipeRefreshView --- .../main/java/com/android/base/app/ui/SwipeRefreshView.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib_base/src/main/java/com/android/base/app/ui/SwipeRefreshView.java b/lib_base/src/main/java/com/android/base/app/ui/SwipeRefreshView.java index 511448f..9e2ced8 100644 --- a/lib_base/src/main/java/com/android/base/app/ui/SwipeRefreshView.java +++ b/lib_base/src/main/java/com/android/base/app/ui/SwipeRefreshView.java @@ -17,8 +17,10 @@ class SwipeRefreshView implements RefreshView { */ @Override public void autoRefresh() { - mSwipeRefreshLayout.setRefreshing(true); - doRefresh(); + mSwipeRefreshLayout.post(() -> { + mSwipeRefreshLayout.setRefreshing(true); + doRefresh(); + }); } @Override