Java tutorial
/* * Copyright (c) 2016 DreamLiner Studio * 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 cn.chenzhongjin.eventbus.sample.ui.activity.adapter; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import java.util.ArrayList; /** * @Title: ?? * @Description: ?Fragment * @auto zengyb * @date 2015-12-10 */ public class CustomFragmentPagerAdapter extends FragmentPagerAdapter { ArrayList<Fragment> list; public CustomFragmentPagerAdapter(FragmentManager fm, ArrayList<Fragment> list) { super(fm); this.list = list; } @Override public int getCount() { return list.size(); } @Override public Fragment getItem(int arg0) { return list.get(arg0); } }