Android Open Source - iTunesAndroidPreview Tabs Pager Adapter






From Project

Back to project page iTunesAndroidPreview.

License

The source code is released under:

GNU General Public License

If you think the Android project iTunesAndroidPreview 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 com.besaba.srmu.adapter;
/*w w  w .  jav a2  s.  c o  m*/
import com.besaba.srmu.CustomizedListView;
import com.besaba.srmu.GamesFragment;
import com.besaba.srmu.MoviesFragment;
import com.besaba.srmu.TopRatedFragment;
import android.content.Intent;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.app.FragmentTabHost;

public class TabsPagerAdapter extends FragmentPagerAdapter {

  public TabsPagerAdapter(FragmentManager fm) {
    super(fm);
  }

  @Override
  public Fragment getItem(int index) {

    switch (index) {
    case 0:
      // Games fragment activity
      return new GamesFragment();
    case 1:
      // Movies fragment activity
      return new MoviesFragment();
    }

    return null;
  }

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


  
}




Java Source Code List

com.besaba.srmu.AlertDialogManager.java
com.besaba.srmu.ConnectionDetector.java
com.besaba.srmu.CustomizedListView.java
com.besaba.srmu.FileCache.java
com.besaba.srmu.GamesFragment.java
com.besaba.srmu.ImageLoader.java
com.besaba.srmu.JSONParser.java
com.besaba.srmu.LazyAdapter.java
com.besaba.srmu.MainActivity.java
com.besaba.srmu.MemoryCache.java
com.besaba.srmu.MoviesFragment.java
com.besaba.srmu.PopUp.java
com.besaba.srmu.ServiceHandler.java
com.besaba.srmu.TopRatedFragment.java
com.besaba.srmu.Utils.java
com.besaba.srmu.XMLParser.java
com.besaba.srmu.adapter.TabsPagerAdapter.java
com.besaba.srmu.videoView.java