// Path: app/src/main/java/com/hut/zero/adapter/MainPagerAdapter.java
// public class MainPagerAdapter extends FragmentPagerAdapter {
//     private String[] mTitles;
// 
//     private ZhihuDailyFragment zhihuDailyFragment;
//     private GuokeHandpickFragment guokeHandpickFragment;
//     private DoubanMomentFragment doubanMomentFragment;
// 
//     public MainPagerAdapter(FragmentManager fm, Context context, ZhihuDailyFragment zhihuDailyFragment, GuokeHandpickFragment guokeHandpickFragment, DoubanMomentFragment doubanMomentFragment) {
//         super(fm);
// 
//         mTitles = new String[]{context.getResources().getString(R.string.zhihu_daily),
//                 context.getResources().getString(R.string.guokr_handpick),
//                 context.getResources().getString(R.string.douban_moment)};
// 
//         this.zhihuDailyFragment=zhihuDailyFragment;
//         this.doubanMomentFragment=doubanMomentFragment;
//         this.guokeHandpickFragment=guokeHandpickFragment;
//     }
// 
//     @Override
//     public Fragment getItem(int position) {
//         switch (position) {
//             case 1:return guokeHandpickFragment;
//             case 2:return doubanMomentFragment;
//             default:return zhihuDailyFragment;
//         }
//     }
// 
//     @Override
//     public int getCount() {
//         return mTitles.length;
//     }
// 
//     @Override
//     public CharSequence getPageTitle(int position) {
//         return mTitles[position];
//     }
// 
//     public ZhihuDailyFragment getZhihuDailyFragment() {
//         return zhihuDailyFragment;
//     }
// 
//     public GuokeHandpickFragment getGuokeHandpickFragment() {
//         return guokeHandpickFragment;
//     }
// 
//     public DoubanMomentFragment getDoubanMomentFragment() {
//         return doubanMomentFragment;
//     }
// }


import android.content.Context;
import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import com.hut.zero.R;
import com.hut.zero.adapter.MainPagerAdapter;
import com.hut.zero.databinding.FragmentMainBinding;
import java.util.Random;
package com.hut.zero.homepage;




/**
 * Created by Zero on 2017/4/2.
 */

public class MainFragment extends Fragment {
    private Context mContext;
// Path: app/src/main/java/com/hut/zero/adapter/MainPagerAdapter.java
// public class MainPagerAdapter extends FragmentPagerAdapter {
//     private String[] mTitles;
// 
//     private ZhihuDailyFragment zhihuDailyFragment;
//     private GuokeHandpickFragment guokeHandpickFragment;
//     private DoubanMomentFragment doubanMomentFragment;
// 
//     public MainPagerAdapter(FragmentManager fm, Context context, ZhihuDailyFragment zhihuDailyFragment, GuokeHandpickFragment guokeHandpickFragment, DoubanMomentFragment doubanMomentFragment) {
//         super(fm);
// 
//         mTitles = new String[]{context.getResources().getString(R.string.zhihu_daily),
//                 context.getResources().getString(R.string.guokr_handpick),
//                 context.getResources().getString(R.string.douban_moment)};
// 
//         this.zhihuDailyFragment=zhihuDailyFragment;
//         this.doubanMomentFragment=doubanMomentFragment;
//         this.guokeHandpickFragment=guokeHandpickFragment;
//     }
// 
//     @Override
//     public Fragment getItem(int position) {
//         switch (position) {
//             case 1:return guokeHandpickFragment;
//             case 2:return doubanMomentFragment;
//             default:return zhihuDailyFragment;
//         }
//     }
// 
//     @Override
//     public int getCount() {
//         return mTitles.length;
//     }
// 
//     @Override
//     public CharSequence getPageTitle(int position) {
//         return mTitles[position];
//     }
// 
//     public ZhihuDailyFragment getZhihuDailyFragment() {
//         return zhihuDailyFragment;
//     }
// 
//     public GuokeHandpickFragment getGuokeHandpickFragment() {
//         return guokeHandpickFragment;
//     }
// 
//     public DoubanMomentFragment getDoubanMomentFragment() {
//         return doubanMomentFragment;
//     }
// }


// Path: app/src/main/java/com/hut/zero/homepage/MainFragment.java
import android.content.Context;
import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import com.hut.zero.R;
import com.hut.zero.adapter.MainPagerAdapter;
import com.hut.zero.databinding.FragmentMainBinding;
import java.util.Random;

package com.hut.zero.homepage;




/**
 * Created by Zero on 2017/4/2.
 */

public class MainFragment extends Fragment {
    private Context mContext;
    private MainPagerAdapter mAdapter;