TrendsHomePresenter.java 1.08 KB
Newer Older
konghaorui committed
1 2
package com.yidianling.dynamic.trendsHome;

YKai committed
3
import androidx.fragment.app.Fragment;
konghaorui committed
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33

import com.yidianling.dynamic.trendList.TrendsListFragment;
import com.yidianling.dynamic.trendsHome.content.TrendsContentListFragment;


/**
 * Created by Jim on 2017/9/22 0022.
 */

public class TrendsHomePresenter {

    ITrendHomeView callBack=null;

    public void fetchDats(){
        Fragment[] fragments=new Fragment[TrendsHomeVpAdapter.dataSize];

        fragments[0]= TrendsContentListFragment.newInstance(2,0, TrendsListFragment.Companion.getTREND_TYPE_DEFAULT(),"0");
        fragments[1]= TrendsContentListFragment.newInstance(1,0, TrendsListFragment.Companion.getTREND_TYPE_DEFAULT(),"0");
        fragments[2]= TrendsContentListFragment.newInstance(3,0, TrendsListFragment.Companion.getTREND_TYPE_DEFAULT(),"0");

//        for (int i = 1; i<= TrendsHomeVpAdapter.dataSize; i++){
//            fragments[i-1]= TrendsContentListFragment.newInstance(i,0,TrendsListFragment.TREND_TYPE_DEFAULT,"0");
//        }

        if(callBack!=null){
            callBack.onFetchedDatas(fragments);
        }
    }

}