Android Open Source - LightControllerApp Tabs Pager Adapter

From Project

Back to project page LightControllerApp.


The source code is released under:

GNU General Public License

If you think the Android project LightControllerApp listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package info.androidhive.tabsswipe.adapter;
/* ww w .j a va2 s  .  c  o  m*/
import info.androidhive.tabsswipe.Fragment2;
import info.androidhive.tabsswipe.Fragment1;

public class TabsPagerAdapter extends FragmentPagerAdapter {

  public TabsPagerAdapter(FragmentManager fm) {

  public Fragment getItem(int index) {

    switch (index) {
    case 0:
      // Top Rated fragment activity
      return new Fragment1();
    case 1:
      // Games fragment activity
      return new Fragment2();

    return null;

  public int getCount() {
    // get item count - equal to number of tabs
    return 2;


Java Source Code List