Skip to content

ViewPager where you can manage page scroll animation in setCurrentItem

License

Notifications You must be signed in to change notification settings

ozodrukh/OViewPager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OViewPager

This is ViewPager with handling duration page changing

i modifed stock ViewPager class, and added 2 methods

setCurrentItem(int position, int duration) 
smoothScrollToWithDuration(int x, int y, int duration)

Documantation

Copy src/OViewPager.java then add it to your package. And see some code below

<yourpackage.ui.OViewPager xmlns:android="http://schemas.android.com/apk/res/android"
              android:id="@+id/pager"
              android:layout_width="match_parent"
              android:layout_height="match_parent" />
int position = 15;
int duration = 5000;

OViewPager mPager = (OViewPager) findViewById(R.id.pager);
mPager.setAdapter(mAdapter)
mPager.setCurrentItem(position, duration);

Some Information

  • Tested on Galaxy Nexus
  • Tested with 100 Elements
  • 100% support Android 4.0+
  • Can't garrant with memory issue

##Thanks!

About

ViewPager where you can manage page scroll animation in setCurrentItem

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published