Catherine22 / MyView

Android ViewPager, refreshable ListView and refreshable GridView

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MyView

Dec. 16 2016
Written by Catherine

ViewPager

Refreshable ListView

  • Add headers
  • Add footers (in this case, showing a ProgressBar) to load more items when it reaches the end.

Note: Requesting split data from your server many times, and scroll to download next group of data to fill in ListView.
Request fewer items at a time so that users don't download the whole data, they just download what the see.
And it's friendly if you need to show data with different pages.
Using Universal-Image-Loader, Fresco, and others libraries to load images.

Refreshable GridView (Use RecyclerView instead of GridView)

  • Add headers
  • Add footers (in this case, showing a ProgressBar) to load more items when it reaches the end.
  • Pull to refresh with SwipeRefreshLayout

RecyclerView

  • Both lists and grids
  • Add headers (included touching event)
  • Add footers (included touching event)
  • Make headers and footers span all the columns in grids.
  • Drag & drop
  • Swipe to remove items
  • Pull to refresh with SwipeRefreshLayout
  • Here is simple RefreshableGridFragment and RecyclerViewAdapter

Fresco Library

  • Load images
  • Using focusCrop scales images to focus point instead of the center so that you won't crop someone's face. Click to see more about FocusCrop.

About

Android ViewPager, refreshable ListView and refreshable GridView

License:Apache License 2.0


Languages

Language:Java 100.0%