Back to project page MConsole.
The source code is released under:
MIT License
If you think the Android project MConsole 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 pl.skifo.mconsole; //from w ww.java 2s .co m import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import android.util.Log; public class TabsPagerAdapter extends FragmentPagerAdapter { private ServerConsoleFragment svFrag; private PlayersFragment plFrag; public TabsPagerAdapter(FragmentManager fm) { super(fm); svFrag = new ServerConsoleFragment(); plFrag = new PlayersFragment(); } @Override public Fragment getItem(int item) { if (MConsoleActivity.LOG_DEBUG) MConsoleActivity.d("TabsPagerAdapter", "getItem<"+item+">"); switch (item) { case 2: return svFrag; case 0: return plFrag; case 1: return new ServerFragment(); } return new ServerConsoleFragment(); } @Override public int getCount() { return 3; } public void refreshPlayers() { plFrag.refreshPlayersList(); } }