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
0
votes
2 answers

SwipeRefreshLayout causes NullPointerException in onCreate

Running my app with SwipeRefreshLayout is causing the app to crash. I have tried to debug the issue, but it seems to occur after the setColorScheme in which it goes into ensureLayout The logcat: 07-09 16:46:56.093: E/AndroidRuntime(18659):…
buczek
  • 2,011
  • 7
  • 29
  • 40
0
votes
1 answer

Can the progress bar of SwipeRefreshLayout be re-positioned to be at the bottom of the activity

Can SwipeRefreshLayout's progress bar be set at the bottom of the activity? I want the progress bar show when the listview or gridview hit the end, then the progress bar showed, and load more data, but the progress bar should be at the bottom of…
Wesley
  • 4,084
  • 6
  • 37
  • 60
0
votes
2 answers

SwipeRefreshLayout and AsyncHttpClient not working on first onCreate

I am using SwipeRefreshLayout to fetch data remotely which I use AsyncHttpClient to take care of the network side of things. Everything works as expected except for one scenario: the first onCreate launch of the app. The main activity: public class…
-1
votes
1 answer

How to Refresh Fragments with swipe to refresh widget?

I wanted to refresh my fragment with SwipeToRefresh widget. This is my XML Code
-1
votes
1 answer

How to apply LiveData to xxxFragment.class instead of XML

How to apply live data isRefreshing to swiperefreshLayout.isRefresh? Code in xxxViewModel.class: var isRefreshing = MutableLiveData() fun refresh() { viewModelScope.launch(Dispatchers.Main) { isRefreshing.value = true …
caibirdcnb
  • 275
  • 5
  • 18
-1
votes
1 answer

How to implement TabBarView with swipe to refresh in flutter?

I want to implement swipe to refresh or pull to refresh with tab bar view in flutter...any suggest
prakash Mp
  • 363
  • 2
  • 15
-1
votes
1 answer

How to refresh data of recyclerview in fragment?

I post API in HomePageActivity and get the Data, and I use the parameters to pass the data to NewFragment and show it. Now, what I want is that when the user in NewFragment uses the swiperefresh, NewFragment will call the function in…
-1
votes
1 answer

Swipe Refresh Layout retry progress bar after (x) minutes

I read documentation of SwipeRefreshLayoutbut couldn't find any method for RetryPolicy. I want SwipeRefreshLayout to show retry in progressbar if data isn't fetched in 5 seconds. Any guideliness
Ubaid Tanoli
  • 183
  • 14
-1
votes
1 answer

Android Studio doesn't accept "this" as LoaderCallBack argument inside OnRefreshListener

I am trying to add Swipe Refresh Layout to my fragment. I am using AsyncTaskLoader to load data. While setting the Refresh Layout's OnRefreshListener, I want to restart the loader to load new data (or else should I do different thing) but I can't…
-1
votes
2 answers

How to implement pull refresh animation on a recyclerView without using external libraries?

I have a simple example where I have a RecyclerView that I want to be refreshed when the user pulls on the top of the list! I have used swipeRefresh layout. However when the list is refreshed the refresh icon is shown on on top of the items. I want…
-1
votes
2 answers

How to use SwipeRefreshLayout to update json data in RecyclerView

I am new in android development. I am learning it. I am able to fetch json data in listview using Recyclerview. Now I want to include swiperRefreshLayout, so any update in server also displayed while refreshing. I search tutorial about…
-1
votes
1 answer

Custom WebClient in my webview inside AlertDialog

I would like to make a custom WebClient in my webview inside the AlertDialog, but my code doesn't work properly. Issue swipeRefreshLayout shows null object reference Code public class PreviewLatestVideo extends BaseActivity { private…
Asqa
  • 103
  • 1
  • 10
-1
votes
1 answer

Pull Screen not indicator with Swipe Refresh Layout Android

I am implementing swipe refresh layout to my fragment. It works perfectly, but I want to pull the screen as animation not the indicator itself. I also want not to show the default indicator because I have my own custom progress bar. Any help will be…
-1
votes
1 answer

RecyclerView in SwipeRefreshLayout not worked

I try use RecyclerView in SwipeRefreshLayout but SwipeRefreshLayout not worked
ip696
  • 6,574
  • 12
  • 65
  • 128
-1
votes
3 answers

How to add swipe-to-refresh in a list view

I am working on a news app and I want to update the ListView every time by swiping down in the MainActivity This is the code of my MainActivity below: package com.infinitystone.mani.news; import android.app.LoaderManager; import…
mani
  • 27
  • 8
1 2 3
45
46