我的Activity
扩展了FragmentActivity
public class SlideScreen extends FragmentActivity {
SectionsPagerAdapter mSectionsPagerAdapter;
ViewPager mViewPager;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_slide_screen);
mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());
mViewPager = (ViewPager) findViewById(R.id.pager);
mViewPager.setAdapter(mSectionsPagerAdapter);
OnPageChangeListener mListener = new OnPageChangeListener() {
@Override
public void onPageSelected(int arg0) {
Log.i("Doing something here", "onPageSelected : "+arg0);
}
@Override
public void onPageScrolled(int arg0, float arg1, int arg2) {
Log.i("My App Logs", "onPageScrolled : "+arg0+" "+arg1+" "+arg2);
}
@Override
public void onPageScrollStateChanged(int arg0) {
Log.i("My App Logs", "onPageScrollStateChanged : "+arg0);
}
};
mViewPager.setOnPageChangeListener(mListener);
}
...
...
}
我想知道用户何时尝试滑出最后一页(共5页),我无法应用OnSwipeOutListener
。
当OnPageChangeListener
从onPageSelected
向4
和4th
轻扫时,5th
无法帮助我4
Activity
以及
我想在最后一页的滑动中开始新的{{1}}。