Exemplo n.º 1
0
 /**
  * Adds a new slide
  *
  * @param fragment Instance of Fragment which should be added as slide
  */
 public void addSlide(@NonNull Fragment fragment) {
   fragments.add(fragment);
   if (isWizardMode) {
     setOffScreenPageLimit(fragments.size());
   }
   mPagerAdapter.notifyDataSetChanged();
 }
Exemplo n.º 2
0
 public void addSlide(@NonNull MyFragment fragment) {
   fragments.add(fragment);
   mPagerAdapter.notifyDataSetChanged();
 }
Exemplo n.º 3
0
 public void addSlide(@NonNull Fragment fragment, @NonNull Context context) {
   fragments.add(Fragment.instantiate(context, fragment.getClass().getName()));
   mPagerAdapter.notifyDataSetChanged();
 }