I am using a ScrollView to display a list of items that are inflated on runtime. Like a feed of updates for the user. While thinking about the options i got to let the user update the view with new notifications I thought about the pull to refresh feature in the twitter app. Anyone got any idea how and if can it be implemented with a ScrollView ? Saw there are some implementations for that using ListView but I don't like the idea of changing all of my platform to gain this refresh effect. | ||||
There is a solution introduced for implementing pull to refresh for various component which are scrollable like listview and scroollview. Look at ChangeLog link https://github.com/chrisbanes/Android-PullToRefresh | ||||
| |||
You can do that. You can increase the top margin of the scrollview when the user moves the finger down and the scrollview it's on it's top. Then on release fire the update and decrease the margin with animation.(You have to create your own animation to pull that off). That's the idea. If you want more particular help ask what you cannot implement. | |||
default
.
stackoverflow.comm
No comments:
Post a Comment