Android Open Source - androidify-yourself Androidify View Pager Adapter






From Project

Back to project page androidify-yourself.

License

The source code is released under:

MIT License

If you think the Android project androidify-yourself 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.github.androidify;
/*from  ww  w  .  ja  v a 2s  . c o m*/
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

public class AndroidifyViewPagerAdapter extends FragmentPagerAdapter {

    private List<Integer> imgIds;

    public AndroidifyViewPagerAdapter(FragmentManager fm, List<Integer> imgIds) {
        super(fm);
        this.imgIds = imgIds;
    }

    @Override
    public Fragment getItem(int position) {
        AndroidifyViewPagerItemFragment fragment = new AndroidifyViewPagerItemFragment();
        fragment.setImgId(imgIds.get(position));
        return fragment;
    }

    @Override
    public int getCount() {
        return imgIds.size();
    }
}




Java Source Code List

com.github.androidify.AndroidDrawables.java
com.github.androidify.AndroidSoundPlayer.java
com.github.androidify.AndroidSoundRecorder.java
com.github.androidify.AndroidifyViewPagerAdapter.java
com.github.androidify.AndroidifyViewPagerItemFragment.java
com.github.androidify.BitmapUtils.java
com.github.androidify.MainActivity.java
com.github.androidify.PlaceholderFragment.java