// Path: Susurrus/app/src/main/java/rocks/susurrus/susurrus/fragments/IntroPageFourFragment.java
// public class IntroPageFourFragment extends Fragment {
// 
//     /**
//      * Views
//      */
//     private EditText passwordInputOne;
//     private EditText passwordInputTwo;
// 
//     @Override
//     public View onCreateView(LayoutInflater inflater, ViewGroup container,
//                              Bundle savedInstanceState) {
//         // Inflate the layout for this fragment
//         View view = inflater.inflate(R.layout.fragment_intro_page_four, container, false);
// 
//         setView(view);
// 
//         return view;
//     }
// 
//     /**
//      * Sets the view.
//      * @param _view Fragment view.
//      */
//     private void setView(View _view) {
//         this.passwordInputOne = (EditText) _view.findViewById(R.id.intro_four_passwort_one);
//         this.passwordInputTwo = (EditText) _view.findViewById(R.id.intro_four_passwort_two);
//     }
// 
// }
// 
// Path: Susurrus/app/src/main/java/rocks/susurrus/susurrus/fragments/IntroPageOneFragment.java
// public class IntroPageOneFragment extends Fragment {
// 
//     private final String logIndictaor = "IntroPageOneFragment";
// 
//     private View rootView;
//     private ViewGroup upperContainer;
//     private ImageView logo;
// 
//     @Override
//     public View onCreateView(LayoutInflater inflater, ViewGroup container,
//                              Bundle savedInstanceState) {
//         // Inflate the layout for this fragment
//         rootView = inflater.inflate(R.layout.fragment_intro_page_one, container, false);
// 
//         return rootView;
//     }
// 
//     @Override
//     public void onViewCreated(View view, Bundle savedInstanceState) {
//         super.onViewCreated(view, savedInstanceState);
// 
//         setLayout(view);
//         //startAnimation();
//     }
// 
// 
//     private void setLayout(View view) {
//         //upperContainer = (ViewGroup) view.findViewById(R.id.upper_container);
//         //logo = (ImageView) view.findViewById(R.id.logo);
//     }
// 
//     private void startAnimation() {
//         logo.setVisibility(View.INVISIBLE);
//     }
// 
// }
// 
// Path: Susurrus/app/src/main/java/rocks/susurrus/susurrus/fragments/IntroPageThreeFragment.java
// public class IntroPageThreeFragment extends Fragment {
// 
//     /**
//      * Views
//      */
//     EditText inputName;
//     ImageButton buttonRandomName;
// 
// 
//     public IntroPageThreeFragment() {
//         // Required empty public constructor
//     }
// 
//     @Override
//     public View onCreateView(LayoutInflater inflater, ViewGroup container,
//                              Bundle savedInstanceState) {
//         // Inflate the layout for this fragment
//         View view = inflater.inflate(R.layout.fragment_intro_page_three, container, false);
// 
//         setView(view);
//         insertRandomName();
// 
//         return view;
//     }
// 
//     /**
//      * Set all view elements.
//      * @param _view Fragment view.
//      */
//     private void setView(View _view) {
//         // get views
//         this.inputName = (EditText) _view.findViewById(R.id.username_input_name);
//         this.buttonRandomName = (ImageButton) _view.findViewById(R.id.username_refresh_button);
// 
//         // set listeners
//         this.buttonRandomName.setOnClickListener(this.randomListener);
//     }
// 
//     /**
//      * Helper method for inserting a random name into username input-field.
//      */
//     private void insertRandomName() {
//         // get a random name & set it
//         RandomName randName = new RandomName(getActivity());
//         inputName.setText(randName.generate());
//     }
// 
//     /**
//      * OnClickListener: buttonRandomName.
//      * Refreshes the random name.
//      */
//     private View.OnClickListener randomListener = new View.OnClickListener() {
//         @Override
//         public void onClick(View v) {
//             insertRandomName();
//         }
//     };
// 
// }
// 
// Path: Susurrus/app/src/main/java/rocks/susurrus/susurrus/fragments/IntroPageTwoFragment.java
// public class IntroPageTwoFragment extends Fragment {
// 
//     @Override
//     public View onCreateView(LayoutInflater inflater, ViewGroup container,
//                              Bundle savedInstanceState) {
//         // Inflate the layout for this fragment
//         return inflater.inflate(R.layout.fragment_intro_page_two, container, false);
//     }
// 
//     private void checkWifiDirect() {
// 
//     }
// 
//     private void checkHotspot() {
// 
//     }
// 
// }


import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
import java.util.ArrayList;
import rocks.susurrus.susurrus.fragments.IntroPageFourFragment;
import rocks.susurrus.susurrus.fragments.IntroPageOneFragment;
import rocks.susurrus.susurrus.fragments.IntroPageThreeFragment;
import rocks.susurrus.susurrus.fragments.IntroPageTwoFragment;
package rocks.susurrus.susurrus.views.adapters;




/**
 * Created by simon on 01.05.15.
 */
public class IntroPageAdapter extends FragmentStatePagerAdapter {

    /**
     * Intro page count
     */
    final static int NUM_PAGES = 4;

    /**
     * Constructor
     * @param fm
     */
    public IntroPageAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        // for each different position, return another fragment with different layout
        switch(position) {
            case 0:
                Fragment fragmentOne = new IntroPageOneFragment();
                return fragmentOne;
            case 1:
                Fragment fragmentTwo = new IntroPageTwoFragment();
                return fragmentTwo;
            case 2:
                Fragment fragmentThree = new IntroPageThreeFragment();
                return fragmentThree;
            case 3:
                Fragment fragmentFour = new IntroPageFourFragment();
                return fragmentFour;
            default:
                return new IntroPageOneFragment();
        }
    }

// Path: Susurrus/app/src/main/java/rocks/susurrus/susurrus/fragments/IntroPageFourFragment.java
// public class IntroPageFourFragment extends Fragment {
// 
//     /**
//      * Views
//      */
//     private EditText passwordInputOne;
//     private EditText passwordInputTwo;
// 
//     @Override
//     public View onCreateView(LayoutInflater inflater, ViewGroup container,
//                              Bundle savedInstanceState) {
//         // Inflate the layout for this fragment
//         View view = inflater.inflate(R.layout.fragment_intro_page_four, container, false);
// 
//         setView(view);
// 
//         return view;
//     }
// 
//     /**
//      * Sets the view.
//      * @param _view Fragment view.
//      */
//     private void setView(View _view) {
//         this.passwordInputOne = (EditText) _view.findViewById(R.id.intro_four_passwort_one);
//         this.passwordInputTwo = (EditText) _view.findViewById(R.id.intro_four_passwort_two);
//     }
// 
// }
// 
// Path: Susurrus/app/src/main/java/rocks/susurrus/susurrus/fragments/IntroPageOneFragment.java
// public class IntroPageOneFragment extends Fragment {
// 
//     private final String logIndictaor = "IntroPageOneFragment";
// 
//     private View rootView;
//     private ViewGroup upperContainer;
//     private ImageView logo;
// 
//     @Override
//     public View onCreateView(LayoutInflater inflater, ViewGroup container,
//                              Bundle savedInstanceState) {
//         // Inflate the layout for this fragment
//         rootView = inflater.inflate(R.layout.fragment_intro_page_one, container, false);
// 
//         return rootView;
//     }
// 
//     @Override
//     public void onViewCreated(View view, Bundle savedInstanceState) {
//         super.onViewCreated(view, savedInstanceState);
// 
//         setLayout(view);
//         //startAnimation();
//     }
// 
// 
//     private void setLayout(View view) {
//         //upperContainer = (ViewGroup) view.findViewById(R.id.upper_container);
//         //logo = (ImageView) view.findViewById(R.id.logo);
//     }
// 
//     private void startAnimation() {
//         logo.setVisibility(View.INVISIBLE);
//     }
// 
// }
// 
// Path: Susurrus/app/src/main/java/rocks/susurrus/susurrus/fragments/IntroPageThreeFragment.java
// public class IntroPageThreeFragment extends Fragment {
// 
//     /**
//      * Views
//      */
//     EditText inputName;
//     ImageButton buttonRandomName;
// 
// 
//     public IntroPageThreeFragment() {
//         // Required empty public constructor
//     }
// 
//     @Override
//     public View onCreateView(LayoutInflater inflater, ViewGroup container,
//                              Bundle savedInstanceState) {
//         // Inflate the layout for this fragment
//         View view = inflater.inflate(R.layout.fragment_intro_page_three, container, false);
// 
//         setView(view);
//         insertRandomName();
// 
//         return view;
//     }
// 
//     /**
//      * Set all view elements.
//      * @param _view Fragment view.
//      */
//     private void setView(View _view) {
//         // get views
//         this.inputName = (EditText) _view.findViewById(R.id.username_input_name);
//         this.buttonRandomName = (ImageButton) _view.findViewById(R.id.username_refresh_button);
// 
//         // set listeners
//         this.buttonRandomName.setOnClickListener(this.randomListener);
//     }
// 
//     /**
//      * Helper method for inserting a random name into username input-field.
//      */
//     private void insertRandomName() {
//         // get a random name & set it
//         RandomName randName = new RandomName(getActivity());
//         inputName.setText(randName.generate());
//     }
// 
//     /**
//      * OnClickListener: buttonRandomName.
//      * Refreshes the random name.
//      */
//     private View.OnClickListener randomListener = new View.OnClickListener() {
//         @Override
//         public void onClick(View v) {
//             insertRandomName();
//         }
//     };
// 
// }
// 
// Path: Susurrus/app/src/main/java/rocks/susurrus/susurrus/fragments/IntroPageTwoFragment.java
// public class IntroPageTwoFragment extends Fragment {
// 
//     @Override
//     public View onCreateView(LayoutInflater inflater, ViewGroup container,
//                              Bundle savedInstanceState) {
//         // Inflate the layout for this fragment
//         return inflater.inflate(R.layout.fragment_intro_page_two, container, false);
//     }
// 
//     private void checkWifiDirect() {
// 
//     }
// 
//     private void checkHotspot() {
// 
//     }
// 
// }


// Path: Susurrus/app/src/main/java/rocks/susurrus/susurrus/views/adapters/IntroPageAdapter.java
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
import java.util.ArrayList;
import rocks.susurrus.susurrus.fragments.IntroPageFourFragment;
import rocks.susurrus.susurrus.fragments.IntroPageOneFragment;
import rocks.susurrus.susurrus.fragments.IntroPageThreeFragment;
import rocks.susurrus.susurrus.fragments.IntroPageTwoFragment;

package rocks.susurrus.susurrus.views.adapters;




/**
 * Created by simon on 01.05.15.
 */
public class IntroPageAdapter extends FragmentStatePagerAdapter {

    /**
     * Intro page count
     */
    final static int NUM_PAGES = 4;

    /**
     * Constructor
     * @param fm
     */
    public IntroPageAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        // for each different position, return another fragment with different layout
        switch(position) {
            case 0:
                Fragment fragmentOne = new IntroPageOneFragment();
                return fragmentOne;
            case 1:
                Fragment fragmentTwo = new IntroPageTwoFragment();
                return fragmentTwo;
            case 2:
                Fragment fragmentThree = new IntroPageThreeFragment();
                return fragmentThree;
            case 3:
                Fragment fragmentFour = new IntroPageFourFragment();
                return fragmentFour;
            default:
                return new IntroPageOneFragment();
        }
    }

    @Override