use of me.yluo.ruisiapp.fragment.FragmentMy in project Ruisi by freedom10086.
the class HomeActivity method initViewpager.
private void initViewpager() {
viewPager = findViewById(R.id.view_pager);
viewPager.setOffscreenPageLimit(4);
viewPager.addOnPageChangeListener(this);
fragments.add(new FrageForums());
fragments.add(new FrageHotsNews());
fragments.add(FrageMessage.newInstance());
fragments.add(new FragmentMy());
MainPageAdapter adapter = new MainPageAdapter(getSupportFragmentManager(), fragments);
viewPager.setAdapter(adapter);
}
Aggregations