package de.fau.amos.virtualledger.android.views.savings.add;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;


public class AddSavingsAccountPagerAdapter extends FragmentPagerAdapter {

    public AddSavingsAccountPagerAdapter(final FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(final int position) {
        return new AddSavingsAccountNameFragment();
    }

    @Override
    public int getCount() {
        return 1;
    }
}

@@ -194,16 +194,41 @@
 dapter;%0A
+import android.util.Log;%0A
 %0A%0Apublic
@@ -294,16 +294,139 @@
 dapter %7B
+%0A    @SuppressWarnings(%22unused%22)%0A    private static final String TAG = AddSavingsAccountPagerAdapter.class.getSimpleName();
 %0A%0A    pu
@@ -590,51 +590,323 @@
     
-return new AddSavingsAccountNameFragment();
+switch (position) %7B%0A            case 0:%0A                return new AddSavingsAccountNameFragment();%0A            case 1:%0A                return new AddSavingsAccountAmountFragment();%0A            default:%0A                Log.e(TAG, %22Trying to switch to invalid pager position%22);%0A                return null;%0A        %7D
 %0A   
@@ -966,17 +966,17 @@
  return 
-1
+2
 ;%0A    %7D%0A

Add second fragment to AddSavingsAccountPagerAdapter