Android Open Source - WhatsOnTV Main Pager Adapter






From Project

Back to project page WhatsOnTV.

License

The source code is released under:

GNU General Public License

If you think the Android project WhatsOnTV 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 net.oncaphillis.whatsontv;
//from w w w.j  a  va 2 s .  c om
import android.support.v4.app.Fragment;
import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

public class MainPagerAdapter extends FragmentStatePagerAdapter {
  private MainActivity _activity = null;
  private int _cols;
  public MainPagerAdapter(FragmentManager fm, MainActivity mainActivity) {
      super(fm);
      _activity = mainActivity;
  }

    @Override
    public android.support.v4.app.Fragment getItem(int i) {
        MainFragment fragment = new MainFragment();
        Bundle args       = new Bundle();
        args.putInt("idx", i);
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    public int getCount() {
        return MainActivity.Titles.length;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return MainActivity.Titles[position];
    }
}




Java Source Code List

net.oncaphillis.whatsontv.AboutActivity.java
net.oncaphillis.whatsontv.BitmapDownloaderTask.java
net.oncaphillis.whatsontv.ErrorActivity.java
net.oncaphillis.whatsontv.MainActivity.java
net.oncaphillis.whatsontv.MainFragment.java
net.oncaphillis.whatsontv.MainPagerAdapter.java
net.oncaphillis.whatsontv.Pager.java
net.oncaphillis.whatsontv.SearchActivity.java
net.oncaphillis.whatsontv.SearchThread.java
net.oncaphillis.whatsontv.SeriesCollectionPagerAdapter.java
net.oncaphillis.whatsontv.SeriesObjectFragment.java
net.oncaphillis.whatsontv.SeriesPagerActivity.java
net.oncaphillis.whatsontv.TmdbKey.java
net.oncaphillis.whatsontv.Tmdb.java
net.oncaphillis.whatsontv.TvSeriesListAdapter.java