diff --git a/ultraviewpager/src/main/java/com/tmall/ultraviewpager/UltraViewPager.java b/ultraviewpager/src/main/java/com/tmall/ultraviewpager/UltraViewPager.java index a1a2abb..70f4674 100644 --- a/ultraviewpager/src/main/java/com/tmall/ultraviewpager/UltraViewPager.java +++ b/ultraviewpager/src/main/java/com/tmall/ultraviewpager/UltraViewPager.java @@ -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