Questions tagged [swiperefreshlayout]

SwipeRefresLayout is a standard way to implement the common Pull to Refresh pattern in Android.

Description

The SwipeRefreshLayout should be used whenever the user can refresh the contents of a view via a vertical swipe gesture. The activity that instantiates this view should add an OnRefreshListener to be notified whenever the swipe to refresh gesture is completed. The SwipeRefreshLayout will notify the listener each and every time the gesture is completed again; the listener is responsible for correctly determining when to actually initiate a refresh of its content. If the listener determines there should not be a refresh, it must call setRefreshing(false) to cancel any visual indication of a refresh. If an activity wishes to show just the progress animation, it should call setRefreshing(true). To disable the gesture and progress animation, call setEnabled(false) on the view.

Link

Android Developer

685 questions
15
votes
2 answers

RecyclerView in SwipeRefreshLayout not "wrap_content"

I have a RecyclerView as the only child of SwipeRefreshLayout, I want the RecyclerView wrap_content. When I set both of them "wrap_content", it doesn't work. The RecyclerView with fewer items also match_parent. When i delete SwipeRefreshLayout, the…
15
votes
4 answers

SwipeRefreshLayout loader not going up when pull down android

I have used SwipeRefreshLayout with recyclerview, Its working fine in all android version but in Kitkat when i pull down then SwipeRefreshLayout loader not going up and also doesn't refresh recyclerview data but working in lollipop I am using…
Faisal Tai
  • 159
  • 1
  • 4
15
votes
4 answers

Make a custom SwipeRefreshLayout Indicator?

How would I go about making a custom indicator that would use a drawable object with a custom animation for the SwipeRefreshLayout? I looked over the source code for SwipeRefreshLayout and I noticed the CircleImageView object was private. Is there…
AndyRoid
  • 5,062
  • 8
  • 38
  • 73
15
votes
2 answers

Can't scroll in a ListView in a swipeRefreshLayout

I'm having an issue with the SwipeRefreshLayout. I have a list view within the layout and every time I scroll upward in the list view the swipe to refresh layout is tiggered and you can never scroll back to the top of the layout. Anyone have any…
VirtualProdigy
  • 1,637
  • 1
  • 20
  • 40
14
votes
2 answers

SwipeRefreshLayout: Swipe progress animation

I'm quite new to android and I'm exploring the sample code on google website. The code I'm on currently is the SwipeRefreshLayout: http://developer.android.com/samples/SwipeRefreshLayoutBasic/index.html In the code, we see the SwipeRefreshLayout…
Simon
  • 19,658
  • 27
  • 149
  • 217
12
votes
2 answers

set location for progressbar in swipe refresh layout android

I used Swipe refresh layout in my app. It worked but I want set location for progress bar in swipe layout margin top 100 px. I don't want use default location of it. How I do? thank you
Trần Văn Hòa
  • 173
  • 1
  • 1
  • 10
12
votes
1 answer

AppBarLayout + TabLayout + CollapsingToolbarLayout + SwipeToRefresh

I met a lot of issues related with my problem but nobody I found wanted the behaviour I'm looking for. I want a view pager with tabs and app bar, when the contained fragments are scrollable and are scrolled (toward bottom), I want the app bar to…
12
votes
1 answer

SyncAdapter always in pending state

I'm currently working on an android app which relies on a SyncAdapter to refresh its content from a server. I basically followed these instructions: https://developer.android.com/training/sync-adapters/creating-sync-adapter.html This worked…
12
votes
2 answers

scrolling up in webview causes refresh by SwipeRefreshLayout

I have a WebView inside a FrameLayout, to add tabs because i am creating a browser. The FrameLayout is inside a SwipeRefreshLayout. The problem: Whenever i scroll the content up fast in the WebView, the refresh icon appears from behind the toolbar.…
12
votes
2 answers

Toolbar not showing with swipe to refresh

I'm trying to implement collapsing tollbar with swipe to refresh and recyclerview. When I'm trying to scroll (when recyclerview has only one item) toolbar collapse, but when I'm trying to scroll down to show toolbar, it's impossible because swipe…
11
votes
4 answers

How to add pull to refresh in Coordinator layout

I have an AppBar and RecyclerView in CoordiantorLayout. SwipeToRefresh has to be fullscreen but RecyclerView not scrolling down then.
11
votes
6 answers

SwipeRefreshLayout pull multiple times behaviour (SDK 23)

I have SwipeRefreshLayout as like this: .xml:
Jemshit
  • 9,501
  • 5
  • 69
  • 106
11
votes
3 answers

Recycler view not scrolling properly after implementing swipe to refresh layout

Prior to the implementation of the Swipe to refresh view, the recycler view was working smoothly but not whenever I try to scroll the recycler view downwards the swipe to refresh interferes and hinders the scroll movement. Here is the screenshot of…
11
votes
1 answer

How to pass int array of color resource ids from array.xml to SwipeRefreshLayout.setColorSchemeResources

I've got Android's SwipeRefreshLayout working and am trying to customize the colors across all the pull to refreshes throughout the app. In order to follow the DRY principle, I've tried moving the desired colors to array.xml as follows:
Andrew Cross
  • 1,921
  • 2
  • 19
  • 32
11
votes
1 answer

SwipeRefreshLayout is hidden behind ActionBar with transparent status bars

I'm having some trouble making my SwipeRefreshLayout visible when using transparent navigation, and status bars (API Level 19). That is to say, its currently under the status bar (at the top of the screen), when I want it to be under the actionbar.…
1 2
3
45 46