修改名称。
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
package com.xscm.moduleutil.adapter;
|
||||
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentStatePagerAdapter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MyFragmentPagerAdapter extends FragmentStatePagerAdapter {
|
||||
|
||||
|
||||
private List<Fragment> fragmentList;
|
||||
|
||||
public MyFragmentPagerAdapter(List<Fragment> list, FragmentManager fm) {
|
||||
super(fm);
|
||||
this.fragmentList = list;
|
||||
}
|
||||
@Override
|
||||
public Fragment getItem(int i) {
|
||||
return fragmentList.get(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return fragmentList.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) {
|
||||
// super.destroyItem(container, position, object);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user