bparmentier / OpenBikeSharing

Shared bikes availability in your city
https://openbikesharing.org
Other
67 stars 56 forks source link

Added SwipeRefreshLayout #25

Closed frazzmark closed 8 years ago

frazzmark commented 8 years ago

I've added a SwipeRefreshLayout, so updating the bikes is easier than touching Menu -> Update.

frazzmark commented 8 years ago

Actually, it's not implemented well. The problem is that the refresh gesture overtakes the scrolling gesture, so you can't scroll up anymore.

bparmentier commented 8 years ago

Not that bad! That's because you put the SwipeRefreshLayout around the ViewPager in activity_stations_list.xml instead of the ListView in fragment_stations_list.xml.

I got it more or less working, but still a bit dirty for now.

frazzmark commented 8 years ago

Actually, I think it should be put inside activity, because the swipe should happen regardless of the fragment. The fragment should tell when it reached the top of the list, then activate the SwipeRefreshLayout