Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Commit

Permalink
Add method to get wrap adapter and refresh data. Fix #34 #36 #37 #84 #90
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAfc committed May 2, 2018
1 parent b15c462 commit 2e43cc9
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,16 @@ public PagerAdapter getAdapter() {
return viewPager.getAdapter() == null ? null : ((UltraViewPagerAdapter) viewPager.getAdapter()).getAdapter();
}

public PagerAdapter getWrapAdapter() {
return viewPager.getAdapter();
}

public void refresh() {
if (viewPager.getAdapter() != null) {
viewPager.getAdapter().notifyDataSetChanged();
}
}

public void setOnPageChangeListener(ViewPager.OnPageChangeListener listener) {
if (pagerIndicator == null) {
//avoid registering the same listener twice
Expand Down

0 comments on commit 2e43cc9

Please sign in to comment.