Blame | Last modification | View Log | RSS feed
package IEEERobotics.IOIOAI.VT;
import android.content.Context;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.view.View;
import com.viewpagerindicator.TitleProvider;
public class ViewPagerAdapter extends PagerAdapter implements TitleProvider {
// private final Context context;
public ViewPagerAdapter(Context context) {
// this.context = context;
}
@Override
public String getTitle(int position) {
return IOIORoboticsActivity.subTitles_.get(position);
}
@Override
public int getCount() {
return IOIORoboticsActivity.subTitles_.size();
}
@Override
public Object instantiateItem(View pager, int position) {
View v = IOIORoboticsActivity.subViews_.get(position);
((ViewPager) pager).addView(v, 0);
return v;
}
@Override
public void destroyItem(View pager, int position, Object view) {
((ViewPager) pager).removeView((View)view);
}
@Override
public boolean isViewFromObject(View view, Object object) {
return view.equals(object);
}
// @Override
// public void finishUpdate(View view) {
//
// }
//
// @Override
// public void restoreState(Parcelable p, ClassLoader c) {
//
// }
//
// @Override
// public Parcelable saveState() {
// return null;
// }
//
// @Override
// public void startUpdate(View view) {
//
// }
}