Back to project page Antares.
The source code is released under:
Apache License
If you think the Android project Antares listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.takac_j30.antares; // w w w . ja va2s . c o m import android.content.Context; import android.os.Parcelable; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentPagerAdapter; import android.support.v4.app.FragmentStatePagerAdapter; import android.support.v4.view.ViewPager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; public class CustomPagerAdapter extends FragmentPagerAdapter { // ??????? static final int NUM_VIEW = 3; LayoutInflater mInflater; public CustomPagerAdapter(android.support.v4.app.FragmentManager fm) { super(fm); } @Override public int getCount() { return NUM_VIEW; } @Override public CharSequence getPageTitle(int position) { // ???????????????????? if(position==0){ return "??????"; }else if(position == 1){ return "??????"; }else{ return "?????"; } } @Override public Fragment getItem(int position) { Fragment fragment = null; switch (position) { case 0: fragment = (Fragment) new TweetSettings(); break; case 1: fragment = (Fragment) new ReplySettings(); break; case 2: fragment = (Fragment) new AppInformation(); } return fragment; } public Fragment findFragmentByPosition(ViewPager viewPager, int position) { return (Fragment) instantiateItem(viewPager, position); } }