Android Open Source - Geek-Coder-News My Fragment Pager Adapter






From Project

Back to project page Geek-Coder-News.

License

The source code is released under:

MIT License

If you think the Android project Geek-Coder-News 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.geekcoder.adapter;
//w  ww. ja v  a2s.  c om
import java.util.ArrayList;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

public class MyFragmentPagerAdapter extends FragmentPagerAdapter{
  ArrayList<Fragment> list;
  public MyFragmentPagerAdapter(FragmentManager fm,ArrayList<Fragment> list) {
    super(fm);
    this.list = list;
    
  }
  
  
  @Override
  public int getCount() {
    return list.size();
  }
  
  @Override
  public Fragment getItem(int arg0) {
    return list.get(arg0);
  }
  
  
  
  
}




Java Source Code List

com.geekcoder.activity.MainActivity.java
com.geekcoder.activity.NewsDetailActivity.java
com.geekcoder.activity.StartActivity.java
com.geekcoder.adapter.ListViewAdapter.java
com.geekcoder.adapter.MyFragmentPagerAdapter.java
com.geekcoder.fragment.TestFragment.java
com.geekcoder.util.Utils.java
com.geekcoder.widget.AutoListView.java