Android - Remove Loading Spinner in SwipeRefreshLayout - Stack Overflow
Android - Remove Loading Spinner in SwipeRefreshLayout - Stack Overflow
xDismiss
JointheStackOverflowCommunity
Signup
RemoveloadingspinnerinSwipeRefreshLayout
IuseaSwipeRefreshLayouttoreloadthecontentofalistview.ItworksandtheonRefreshListeneristriggeredbutthesmallloadingspinnerthat
appearsonswipedoesn'twanttodismissaftertheloadingiscomplete.Isthereawaytomakeitgo?
Edit:fixedSwipeViewmeansSwipeRefreshLayout
android swipeview
editedFeb18'15at11:58 askedFeb18'15at11:30
Labe
396 7 22
3Answers
answeredFeb18'15at11:35
TheRedFox
1,230 1 8 20
Yesitwaswhatimeant.IcorrectedtheViewnamemistakeintheop.Thankyouyoursolutionworks!
Labe Feb18'15at12:00
Ihavethisscenario,gettingJSONdatafromserver.AndhowtotestifitisalreadyloadedsothatSRLcan
bedismisssettofalseRoCk Jun9'16at13:48
Thecorrectwayofusingitislikethis:
if(swipeLayout.isRefreshing()){
swipeLayout.setRefreshing(false);
}
answeredFeb18'15at12:18
dvs
314 2 9
Savedmyyear!Thanks!LaraBelleJan5at9:26
http://stackoverflow.com/questions/28582544/removeloadingspinnerinswiperefreshlayout 1/2
3/3/2017 androidRemoveloadingspinnerinSwipeRefreshLayoutStackOverflow
privateSwipeRefreshLayoutswipeLayout;
protectedvoidonCreate(BundlesavedInstanceState){
....
swipeLayout=(SwipeRefreshLayout)findViewById(R.id.swipe_container);
swipeLayout.setOnRefreshListener(newSwipeRefreshLayout.OnRefreshListener(){
@Override
publicvoidonRefresh(){
//Doyourtask
swipeLayout.setRefreshing(false);
}
});
}
Detailsavailablehere.
https://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout.html
answeredFeb18'15at11:47
MukeshKumar
3,115 2 12 25
http://stackoverflow.com/questions/28582544/removeloadingspinnerinswiperefreshlayout 2/2