0

I use a View Pager in my app to get animations between fragments, but I've got a problem because I use a button to pass fragments, I have disabled swipe option, and when a fragment pass to other, it is really quickly and you can not see anything. I want to pass more slowly so, Can you help me please?

I use this method to pass fragments:

myViewPager.setCurrentItem(int fragment_position);

If you need more information just say it.

ligi
  • 39,001
  • 44
  • 144
  • 244
  • have you checked [this](http://stackoverflow.com/a/22044976/2591002) and [this](http://stackoverflow.com/a/14179739/2591002)??? – SweetWisher ツ Aug 15 '14 at 09:42
  • @SweetWisher ツ I have tried to implement the second way, but I've got some problems, here the code: `@Override void setCurrentItemInternal(int item, boolean smoothScroll, boolean always) { setCurrentItemInternal(item, smoothScroll, always, VELOCITY);//Here is the problem }` In the second setCurrentItemInternal I can't call this method because I am not inside in the package and if I tried to put package android.support.v4.view; the program crash too because this is not my package. I haven't tried the second way, it is too heavy for a noob like me. – Emilio Bello Aug 15 '14 at 10:52
  • @SweetWisher ツ I have get it finally, I have use this [method](http://stackoverflow.com/questions/10812009/change-viewpager-animation-duration-when-sliding-programmatically/14179739#14179739). Thank you very much for your time :D. – Emilio Bello Aug 15 '14 at 13:59

0 Answers0