user1209216
user1209216

Reputation: 7914

Android/Java - refresh activity like in gmail app

I don't really know how to name it. In android gmail app or google now, etc it's possible to refresh data by all content down and then release it. All data are refreshed, with nice animation.

I'm looking for solution how it's done and how can I do the same in my own application. Do you have any examples, tutorials etc? How to develop this kind of "pull to refhresh"?

[edit] What is better - 3rd party lib or Android SDK functionality? I'm looking for look like closest to gmail app.

Upvotes: 0

Views: 1900

Answers (3)

duggu
duggu

Reputation: 38429

Read below lib for refresh your page :

https://github.com/chrisbanes/Android-PullToRefresh

This lib support :-

  1. ListView

  2. ExpandableListView

  3. GridView

  4. WebView

  5. ScrollView

  6. HorizontalScrollView

  7. ViewPager

Upvotes: 1

Zeeshan Ahmed
Zeeshan Ahmed

Reputation: 1187

There is a Pull to refresh library which is mostly used. It is very easy to implement. From here you can download it.

Pull To Refresh for Android

Just import the library into your IDE, and add it your project as a dependency. An example is also included form which you can get coding related help.

Upvotes: 0

Boban S.
Boban S.

Reputation: 1662

There is a SwipeToRefreshLayout in android which is used to to that.

https://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout.html

Here is one of the tutorials

http://antonioleiva.com/swiperefreshlayout/

Upvotes: 3

Related Questions