Example #1
0
 private void displaySubjectwiseMarks() {
   testwisePager.setVisibility(View.GONE);
   subjectwisePager.removeAllViews();
   subjectwisePager.setVisibility(View.VISIBLE);
   List<Fragment> fragments =
       getFragments(mSubjectwiseSparseArrayList.size(), mSubjectwiseSparseArrayList);
   MyPageAdapter pageAdapter = new MyPageAdapter(getSupportFragmentManager(), fragments);
   pageAdapter.notifyDataSetChanged();
   subjectwisePager.setAdapter(pageAdapter);
   updateIndicator(0, fragments.size());
 }
 private void initpage(List<Images> list) {
   if (list == null) {
     return;
   }
   views.clear();
   for (int i = 0; i < list.size(); i++) {
     View itemview = inflater.inflate(R.layout.pageitem_view, null);
     ImageView iv_image = (ImageView) itemview.findViewById(R.id.iv_image);
     displayImage(images.get(i).toString(), iv_image);
     views.add(itemview);
   }
   pager.removeAllViews();
   adapter = new MypageAdapter(views);
   pager.setAdapter(adapter);
   if (pos > 0 && pos < list.size()) {
     pager.setCurrentItem(pos, false);
   }
 }
 private void clearWorkers() {
   mWorkerPageList.clear();
   mWorkerPager.removeAllViews();
   mWorkerPagerIndicatorContainer.removeAllViews();
 }