// Path: app/src/main/java/com/zsorg/neteasecloudmusic/adapters/MusicPagerAdapter.java
// public class MusicPagerAdapter extends FragmentPagerAdapter {
//     private final ArrayList<SubMusicFragment> mList;
//     @BindArray(R.array.music)
//     String[] mTabName;
//     private int[] mFragmentType = {CONST.TYPE_SINGLE, CONST.TYPE_SINGER, CONST.TYPE_ALBUM, CONST.TYPE_FOLDER};
// 
//     public MusicPagerAdapter(View view, FragmentManager fm) {
//         super(fm);
//         ButterKnife.bind(this, view);
// 
//         mList = new ArrayList<>();
//         for (int position=0;position<mFragmentType.length;position++) {
//             mList.add(SubMusicFragment.newInstance(mFragmentType[position]));
//         }
// 
//     }
// 
//     @Override
//     public Fragment getItem(int position) {
//         return mList.get(position);
//     }
// 
//     @Override
//     public int getCount() {
//         return mTabName.length;
//     }
// 
//     @Override
//     public CharSequence getPageTitle(int position) {
//         return mTabName[position];
//     }
// }


import android.net.Uri;
import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.zsorg.neteasecloudmusic.R;
import com.zsorg.neteasecloudmusic.adapters.MusicPagerAdapter;
import butterknife.BindView;
import butterknife.ButterKnife;
package com.zsorg.neteasecloudmusic.fragments;





/**
 * A simple {@link Fragment} subclass.
 * Activities that contain this fragment must implement the
 * {@link MusicFragment.OnFragmentInteractionListener} interface
 * to handle interaction events.
 * Use the {@link MusicFragment#newInstance} factory method to
 * create an instance of this fragment.
 */
public class MusicFragment extends Fragment implements ViewPager.OnPageChangeListener {

    @BindView(R.id.music_tab)
    TabLayout mTabLayout;
    @BindView(R.id.music_viewpager)
    ViewPager mViewpager;

// Path: app/src/main/java/com/zsorg/neteasecloudmusic/adapters/MusicPagerAdapter.java
// public class MusicPagerAdapter extends FragmentPagerAdapter {
//     private final ArrayList<SubMusicFragment> mList;
//     @BindArray(R.array.music)
//     String[] mTabName;
//     private int[] mFragmentType = {CONST.TYPE_SINGLE, CONST.TYPE_SINGER, CONST.TYPE_ALBUM, CONST.TYPE_FOLDER};
// 
//     public MusicPagerAdapter(View view, FragmentManager fm) {
//         super(fm);
//         ButterKnife.bind(this, view);
// 
//         mList = new ArrayList<>();
//         for (int position=0;position<mFragmentType.length;position++) {
//             mList.add(SubMusicFragment.newInstance(mFragmentType[position]));
//         }
// 
//     }
// 
//     @Override
//     public Fragment getItem(int position) {
//         return mList.get(position);
//     }
// 
//     @Override
//     public int getCount() {
//         return mTabName.length;
//     }
// 
//     @Override
//     public CharSequence getPageTitle(int position) {
//         return mTabName[position];
//     }
// }


// Path: app/src/main/java/com/zsorg/neteasecloudmusic/fragments/MusicFragment.java
import android.net.Uri;
import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.zsorg.neteasecloudmusic.R;
import com.zsorg.neteasecloudmusic.adapters.MusicPagerAdapter;
import butterknife.BindView;
import butterknife.ButterKnife;

package com.zsorg.neteasecloudmusic.fragments;





/**
 * A simple {@link Fragment} subclass.
 * Activities that contain this fragment must implement the
 * {@link MusicFragment.OnFragmentInteractionListener} interface
 * to handle interaction events.
 * Use the {@link MusicFragment#newInstance} factory method to
 * create an instance of this fragment.
 */
public class MusicFragment extends Fragment implements ViewPager.OnPageChangeListener {

    @BindView(R.id.music_tab)
    TabLayout mTabLayout;
    @BindView(R.id.music_viewpager)
    ViewPager mViewpager;

    private MusicPagerAdapter mAdapter;