// Path: app/src/main/java/com/hitanshudhawan/popcorn/adapters/FavouritesPagerAdapter.java
// public class FavouritesPagerAdapter extends FragmentPagerAdapter {
// 
//     private Context mContext;
// 
//     public FavouritesPagerAdapter(FragmentManager fm, Context context) {
//         super(fm);
//         mContext = context;
//     }
// 
//     @Override
//     public Fragment getItem(int position) {
//         switch (position) {
//             case 0:
//                 return new FavouriteMoviesFragment();
//             case 1:
//                 return new FavouriteTVShowsFragment();
//         }
//         return null;
//     }
// 
//     @Override
//     public int getCount() {
//         return 2;
//     }
// 
//     @Override
//     public CharSequence getPageTitle(int position) {
//         switch (position) {
//             case 0:
//                 return mContext.getResources().getString(R.string.movies);
//             case 1:
//                 return mContext.getResources().getString(R.string.tv_shows);
//         }
//         return null;
//     }
// }


import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.hitanshudhawan.popcorn.R;
import com.hitanshudhawan.popcorn.adapters.FavouritesPagerAdapter;
import com.ogaclejapan.smarttablayout.SmartTabLayout;
package com.hitanshudhawan.popcorn.fragments;



/**
 * Created by hitanshu on 10/8/17.
 */

public class FavouritesFragment extends Fragment {

    private SmartTabLayout mSmartTabLayout;
    private ViewPager mViewPager;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_favourites, container, false);

        mSmartTabLayout = (SmartTabLayout) view.findViewById(R.id.tab_view_pager_fav);
        mViewPager = (ViewPager) view.findViewById(R.id.view_pager_fav);
// Path: app/src/main/java/com/hitanshudhawan/popcorn/adapters/FavouritesPagerAdapter.java
// public class FavouritesPagerAdapter extends FragmentPagerAdapter {
// 
//     private Context mContext;
// 
//     public FavouritesPagerAdapter(FragmentManager fm, Context context) {
//         super(fm);
//         mContext = context;
//     }
// 
//     @Override
//     public Fragment getItem(int position) {
//         switch (position) {
//             case 0:
//                 return new FavouriteMoviesFragment();
//             case 1:
//                 return new FavouriteTVShowsFragment();
//         }
//         return null;
//     }
// 
//     @Override
//     public int getCount() {
//         return 2;
//     }
// 
//     @Override
//     public CharSequence getPageTitle(int position) {
//         switch (position) {
//             case 0:
//                 return mContext.getResources().getString(R.string.movies);
//             case 1:
//                 return mContext.getResources().getString(R.string.tv_shows);
//         }
//         return null;
//     }
// }


// Path: app/src/main/java/com/hitanshudhawan/popcorn/fragments/FavouritesFragment.java
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.hitanshudhawan.popcorn.R;
import com.hitanshudhawan.popcorn.adapters.FavouritesPagerAdapter;
import com.ogaclejapan.smarttablayout.SmartTabLayout;

package com.hitanshudhawan.popcorn.fragments;



/**
 * Created by hitanshu on 10/8/17.
 */

public class FavouritesFragment extends Fragment {

    private SmartTabLayout mSmartTabLayout;
    private ViewPager mViewPager;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_favourites, container, false);

        mSmartTabLayout = (SmartTabLayout) view.findViewById(R.id.tab_view_pager_fav);
        mViewPager = (ViewPager) view.findViewById(R.id.view_pager_fav);
        mViewPager.setAdapter(new FavouritesPagerAdapter(getChildFragmentManager(), getContext()));