// Path: benih/src/main/java/id/zelory/benih/adapter/BenihPagerAdapter.java
// public abstract class BenihPagerAdapter<Fragment extends BenihFragment> extends
//         FragmentStatePagerAdapter
// {
//     protected List<Fragment> fragments;
//     protected List<String> titles;
// 
//     public BenihPagerAdapter(FragmentManager fm, List<Fragment> fragments)
//     {
//         super(fm);
//         this.fragments = fragments;
//         Timber.tag(getClass().getSimpleName());
//     }
// 
//     public BenihPagerAdapter(FragmentManager fm, List<Fragment> fragments, List<String> titles)
//     {
//         super(fm);
//         this.fragments = fragments;
//         this.titles = titles;
//         Timber.tag(getClass().getSimpleName());
//     }
// 
//     @Override
//     public abstract Fragment getItem(int position);
// 
//     @Override
//     public int getCount()
//     {
//         return fragments.size();
//     }
// 
//     public List<Fragment> getFragments()
//     {
//         return fragments;
//     }
// 
//     public void setFragments(List<Fragment> fragments)
//     {
//         this.fragments = fragments;
//     }
// 
//     public List<String> getTitles()
//     {
//         return titles;
//     }
// 
//     public void setTitles(List<String> titles)
//     {
//         this.titles = titles;
//     }
// 
//     @Override
//     public CharSequence getPageTitle(int position)
//     {
//         return titles.size() == fragments.size() ? titles.get(position) : super.getPageTitle(position);
//     }
// }
// 
// Path: benih/src/main/java/id/zelory/benih/fragment/BenihFragment.java
// public abstract class BenihFragment<Data extends Parcelable> extends RxFragment
// {
//     protected Data data;
// 
//     public BenihFragment()
//     {
// 
//     }
// 
//     @Override
//     public void onCreate(@Nullable Bundle savedInstanceState)
//     {
//         super.onCreate(savedInstanceState);
//         Timber.tag(getClass().getSimpleName());
//     }
// 
//     @Nullable
//     @Override
//     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
//     {
//         View view = LayoutInflater.from(getActivity()).inflate(getFragmentView(), container, false);
//         ButterKnife.bind(this, view);
//         return view;
//     }
// 
//     @Override
//     public void onActivityCreated(@Nullable Bundle savedInstanceState)
//     {
//         super.onActivityCreated(savedInstanceState);
//         if (savedInstanceState != null)
//         {
//             data = savedInstanceState.getParcelable("data");
//         }
//         onViewReady(savedInstanceState);
//     }
// 
//     public void setData(Data data)
//     {
//         this.data = data;
//     }
// 
//     public Data getData()
//     {
//         return data;
//     }
// 
//     protected abstract int getFragmentView();
// 
//     protected abstract void onViewReady(@Nullable Bundle savedInstanceState);
// 
//     @Override
//     public void onSaveInstanceState(Bundle outState)
//     {
//         outState.putParcelable("data", data);
//         super.onSaveInstanceState(outState);
//     }
// 
//     @Override
//     public void onDestroy()
//     {
//         data = null;
//         super.onDestroy();
//     }
// 
//     public void replace(int containerId, BenihFragment fragment, boolean addToBackStack)
//     {
//         if (addToBackStack)
//         {
//             getFragmentManager().beginTransaction()
//                     .replace(containerId, fragment, fragment.getClass().getSimpleName())
//                     .addToBackStack(null)
//                     .commit();
//         } else
//         {
//             getFragmentManager().beginTransaction()
//                     .replace(containerId, fragment, fragment.getClass().getSimpleName())
//                     .commit();
//         }
//     }
// 
//     public void replace(int containerId, BenihFragment fragment, boolean addToBackStack, int transitionStyle)
//     {
//         if (addToBackStack)
//         {
//             getFragmentManager().beginTransaction()
//                     .replace(containerId, fragment, fragment.getClass().getSimpleName())
//                     .setTransitionStyle(transitionStyle)
//                     .commit();
//         } else
//         {
//             getFragmentManager().beginTransaction()
//                     .replace(containerId, fragment, fragment.getClass().getSimpleName())
//                     .setTransitionStyle(transitionStyle)
//                     .commit();
//         }
//     }
// 
//     protected ActionBar getSupportActionBar()
//     {
//         return ((BenihActivity) getActivity()).getSupportActionBar();
//     }
// 
//     protected void setSupportActionBar(Toolbar toolbar)
//     {
//         ((BenihActivity) getActivity()).setSupportActionBar(toolbar);
//     }
// }


import android.support.v4.app.FragmentManager;
import java.util.List;
import id.zelory.benih.adapter.BenihPagerAdapter;
import id.zelory.benih.fragment.BenihFragment;
/*
 * Copyright (c) 2015 Zelory.
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

package id.zelory.codepolitan.ui.adapter;




/**
 * Created on : August 1, 2015
 * Author     : zetbaitsu
 * Name       : Zetra
 * Email      : zetra@mail.ugm.ac.id
 * GitHub     : https://github.com/zetbaitsu
 * LinkedIn   : https://id.linkedin.com/in/zetbaitsu
 */
public class MainPagerAdapter extends BenihPagerAdapter<BenihFragment>
{
    public MainPagerAdapter(FragmentManager fm, List<BenihFragment> list)
    {
// Path: benih/src/main/java/id/zelory/benih/adapter/BenihPagerAdapter.java
// public abstract class BenihPagerAdapter<Fragment extends BenihFragment> extends
//         FragmentStatePagerAdapter
// {
//     protected List<Fragment> fragments;
//     protected List<String> titles;
// 
//     public BenihPagerAdapter(FragmentManager fm, List<Fragment> fragments)
//     {
//         super(fm);
//         this.fragments = fragments;
//         Timber.tag(getClass().getSimpleName());
//     }
// 
//     public BenihPagerAdapter(FragmentManager fm, List<Fragment> fragments, List<String> titles)
//     {
//         super(fm);
//         this.fragments = fragments;
//         this.titles = titles;
//         Timber.tag(getClass().getSimpleName());
//     }
// 
//     @Override
//     public abstract Fragment getItem(int position);
// 
//     @Override
//     public int getCount()
//     {
//         return fragments.size();
//     }
// 
//     public List<Fragment> getFragments()
//     {
//         return fragments;
//     }
// 
//     public void setFragments(List<Fragment> fragments)
//     {
//         this.fragments = fragments;
//     }
// 
//     public List<String> getTitles()
//     {
//         return titles;
//     }
// 
//     public void setTitles(List<String> titles)
//     {
//         this.titles = titles;
//     }
// 
//     @Override
//     public CharSequence getPageTitle(int position)
//     {
//         return titles.size() == fragments.size() ? titles.get(position) : super.getPageTitle(position);
//     }
// }
// 
// Path: benih/src/main/java/id/zelory/benih/fragment/BenihFragment.java
// public abstract class BenihFragment<Data extends Parcelable> extends RxFragment
// {
//     protected Data data;
// 
//     public BenihFragment()
//     {
// 
//     }
// 
//     @Override
//     public void onCreate(@Nullable Bundle savedInstanceState)
//     {
//         super.onCreate(savedInstanceState);
//         Timber.tag(getClass().getSimpleName());
//     }
// 
//     @Nullable
//     @Override
//     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
//     {
//         View view = LayoutInflater.from(getActivity()).inflate(getFragmentView(), container, false);
//         ButterKnife.bind(this, view);
//         return view;
//     }
// 
//     @Override
//     public void onActivityCreated(@Nullable Bundle savedInstanceState)
//     {
//         super.onActivityCreated(savedInstanceState);
//         if (savedInstanceState != null)
//         {
//             data = savedInstanceState.getParcelable("data");
//         }
//         onViewReady(savedInstanceState);
//     }
// 
//     public void setData(Data data)
//     {
//         this.data = data;
//     }
// 
//     public Data getData()
//     {
//         return data;
//     }
// 
//     protected abstract int getFragmentView();
// 
//     protected abstract void onViewReady(@Nullable Bundle savedInstanceState);
// 
//     @Override
//     public void onSaveInstanceState(Bundle outState)
//     {
//         outState.putParcelable("data", data);
//         super.onSaveInstanceState(outState);
//     }
// 
//     @Override
//     public void onDestroy()
//     {
//         data = null;
//         super.onDestroy();
//     }
// 
//     public void replace(int containerId, BenihFragment fragment, boolean addToBackStack)
//     {
//         if (addToBackStack)
//         {
//             getFragmentManager().beginTransaction()
//                     .replace(containerId, fragment, fragment.getClass().getSimpleName())
//                     .addToBackStack(null)
//                     .commit();
//         } else
//         {
//             getFragmentManager().beginTransaction()
//                     .replace(containerId, fragment, fragment.getClass().getSimpleName())
//                     .commit();
//         }
//     }
// 
//     public void replace(int containerId, BenihFragment fragment, boolean addToBackStack, int transitionStyle)
//     {
//         if (addToBackStack)
//         {
//             getFragmentManager().beginTransaction()
//                     .replace(containerId, fragment, fragment.getClass().getSimpleName())
//                     .setTransitionStyle(transitionStyle)
//                     .commit();
//         } else
//         {
//             getFragmentManager().beginTransaction()
//                     .replace(containerId, fragment, fragment.getClass().getSimpleName())
//                     .setTransitionStyle(transitionStyle)
//                     .commit();
//         }
//     }
// 
//     protected ActionBar getSupportActionBar()
//     {
//         return ((BenihActivity) getActivity()).getSupportActionBar();
//     }
// 
//     protected void setSupportActionBar(Toolbar toolbar)
//     {
//         ((BenihActivity) getActivity()).setSupportActionBar(toolbar);
//     }
// }


// Path: app/src/main/java/id/zelory/codepolitan/ui/adapter/MainPagerAdapter.java
import android.support.v4.app.FragmentManager;
import java.util.List;
import id.zelory.benih.adapter.BenihPagerAdapter;
import id.zelory.benih.fragment.BenihFragment;

/*
 * Copyright (c) 2015 Zelory.
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

package id.zelory.codepolitan.ui.adapter;




/**
 * Created on : August 1, 2015
 * Author     : zetbaitsu
 * Name       : Zetra
 * Email      : zetra@mail.ugm.ac.id
 * GitHub     : https://github.com/zetbaitsu
 * LinkedIn   : https://id.linkedin.com/in/zetbaitsu
 */
public class MainPagerAdapter extends BenihPagerAdapter<BenihFragment>
{
    public MainPagerAdapter(FragmentManager fm, List<BenihFragment> list)
    {
        super(fm, list);