@Test public void testReplacePageView() throws Exception { testAddPageView(); View relace = new View(child.getContext()); adapter.replacePageView(child,relace); assertEquals(adapter.getRealCount(),3); }
public void replacePageView(View oldView, View newView) { if (WXEnvironment.isApkDebugable()) { WXLogUtils.d("onPageSelected >>>> replacePageView"); } int index = views.indexOf(oldView); views.remove(index); views.add(index, newView); ensureShadow(); }
WXCirclePageAdapter extends PagerAdapter { public void replacePageView(View oldView, View newView) { if (WXEnvironment.isApkDebugable()) { WXLogUtils.d("onPageSelected >>>> replacePageView"); } int index = views.indexOf(oldView); views.remove(index); views.add(index, newView); ensureShadow(); } }
WXCirclePageAdapter extends PagerAdapter { public void replacePageView(View oldView, View newView) { if (WXEnvironment.isApkDebugable()) { WXLogUtils.d("onPageSelected >>>> replacePageView"); } int index = views.indexOf(oldView); views.remove(index); views.add(index, newView); ensureShadow(); } WXCirclePageAdapter(List<View> views, boolean needLoop);  WXCirclePageAdapter();  WXCirclePageAdapter(boolean needLoop); }
WXCirclePageAdapter extends PagerAdapter { public void replacePageView(View oldView, View newView) { if (WXEnvironment.isApkDebugable()) { WXLogUtils.d("onPageSelected >>>> replacePageView"); } int index = views.indexOf(oldView); views.remove(index); views.add(index, newView); ensureShadow(); } WXCirclePageAdapter(List<View> views, boolean needLoop);  WXCirclePageAdapter();  WXCirclePageAdapter(boolean needLoop); void addPageView(View view); void removePageView(View view); void replacePageView(View oldView, View newView); @Override int getCount(); int getRealCount(); @Override Object instantiateItem(ViewGroup container, int position); @Override void destroyItem(ViewGroup container, int position, Object object); @Override boolean isViewFromObject(View view, Object object); @Override int getItemPosition(Object object); int getPagePosition(View page); int getItemIndex(Object object); List<View> getViews(); int getRealPosition(int shadowPosition); int getFirst(); }
WXCirclePageAdapter extends PagerAdapter { public void replacePageView(View oldView, View newView) { if (WXEnvironment.isApkDebugable()) { WXLogUtils.d("onPageSelected >>>> replacePageView"); } int index = views.indexOf(oldView); views.remove(index); views.add(index, newView); ensureShadow(); } WXCirclePageAdapter(List<View> views, boolean needLoop);  WXCirclePageAdapter();  WXCirclePageAdapter(boolean needLoop); void addPageView(View view); void removePageView(View view); void replacePageView(View oldView, View newView); @Override int getCount(); int getRealCount(); @Override Object instantiateItem(ViewGroup container, int position); @Override void destroyItem(ViewGroup container, int position, Object object); @Override boolean isViewFromObject(View view, Object object); @Override int getItemPosition(Object object); int getPagePosition(View page); int getItemIndex(Object object); List<View> getViews(); int getRealPosition(int shadowPosition); int getFirst();  }