Back to project page Arduino-Android-BLE-NRF8001.
The source code is released under:
MIT License
If you think the Android project Arduino-Android-BLE-NRF8001 listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.adapters; // ww w. j a va2 s .co m import android.content.Context; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; public class MainViewPagerAdapter extends FragmentPagerAdapter { Class<?>[] fragments; private final Context mContext; public MainViewPagerAdapter(FragmentManager fm, Context context) { super(fm); mContext = context; } public MainViewPagerAdapter(FragmentManager fm, Context context, Class<?>[] fragments) { super(fm); this.fragments = fragments; this.mContext = context; } @Override public Fragment getItem(int pos) { return Fragment.instantiate(mContext, fragments[pos].getName(), null); } @Override public int getCount() { return fragments.length; } }