package com.cky.learnandroiddetails;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class TestViewPagerWithoutFragmentAct extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test_view_pager_without_fragment);
    }
}

package com.cky.learnandroiddetails;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
/*
* https://www.bignerdranch.com/blog/viewpager-without-fragments/
* http://stackoverflow.com/questions/18710561/can-i-use-view-pager-with-views-not-with-fragments
* */
public class TestViewPagerWithoutFragmentAct extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test_view_pager_without_fragment);
    }
}

更新 TestViewPagerWithoutFragmentAct【新增参考】