Swipe refresh not working if list is empty
See original GitHub issuePulling down is not working if there are no items and the empty view is shown.
Investigate android/support/v4/widget/SwipeRefreshLayout.java
.
Issue Analytics
- State:
- Created 9 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Android SwipeRefreshLayout with empty TextView not ...
The problem is that if you set tv_no_product as emptyView for the ListView, then the ListView sets its visibility to GONE while the...
Read more >Swipe Refresh for Jetpack Compose
A library which provides a layout which provides the swipe-to-refresh UX pattern, similar to Android's SwipeRefreshLayout . Your browser does not support the ......
Read more >SwipeRefreshLayout indicator does not shown [37007421]
Empty view is for empty list, having a separate loading indicator and a swipe-to-refresh indicator is problematic to code and may confuse the...
Read more >drag down refresh functionality using SwipeRefreshLayout in ...
How to implement swipe/ drag down refresh functionality using SwipeRefreshLayout in the Android App?
Read more >pull_to_refresh | Flutter Package - Pub.dev
This problem can only wait for flutter to fix this. SmartRefresher does not have refresh injection into ScrollView under the subtree, that is,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
thanks for documenting this!
OK, turns out the
SwipeRefreshLayout
intercepts touch MOVE events (see itsonTouchEvent
). A regular non-scrollable view/view group won’t trigger these.Solution: wrap empty view into a
ScrollView
. Stick bothAdapterView
and theScrollView
into aViewGroup
and put it into theSwipeRefreshLayout
.Then override
canChildScrollUp()
to check the adapter view or scroll view, depending on which one is visible at the time.