The DynamicPagerAdapter extends Android's PagerAdapter to do four important things:
-
Has an accessible HashMap View cache using ViewHolders. The default implementaiton has caching, but it isn't enforced and users of the PagerAdapter don't get access to it.
-
Provides the capability to use multiple view types just like RecyclerView.
-
Handles data set changes in a much more friendly way, allowing items to be removed, added, etc. with less issues and effort on your end.
-
Includes optional discard animations. These are exposed for you to call when you want or to override and create your own.
from The Android Arsenal
No comments:
Post a Comment