Android Open Source - Arduino-Android-BLE-NRF8001 Main View Pager Adapter






From Project

Back to project page Arduino-Android-BLE-NRF8001.

License

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.

Java Source Code

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;
    }

}




Java Source Code List

com.adapters.ListAdapterCheckboxTitle.java
com.adapters.ListAdapterTitleDescription.java
com.adapters.ListAdapterTitleDescription.java
com.adapters.MainViewPagerAdapter.java
com.ble.sensors.NRF8001.java
edu.uci.fallsensor.MainActivity.java
edu.uci.fallsensor.dialog.SensorDialog.java
edu.uci.fallsensor.service.BLEController.java
edu.uci.fallsensor.service.BLEManager.java
edu.uci.fallsensor.service.BLEState.java
edu.uci.fallsensor.service.BLETask.java
edu.uci.fallsensor.service.BluetoothMetaData.java