I'd like to disable all the animations for the transitions in my custom ViewPager
.
This view pager contains four tabs -and each tab loads a Fragment
- and what the view pager does is to switch the tabs: for example first tab is the index, second is map, etc.
The problem is that if, being the first tab chosen, I click on the fourth tab, I can see how the ViewPager
goes through the second and third tab and stops on the fourth, and I don't want that to happen.
I tried to disable all the animations for this ViewPager
trying to use a setAnimation
to null
every time the user chooses a new tab to be displayed, but it still doesn't work.
Any idea to achieve this, please?
Thanks a lot in advance!
EDIT: I also tried to override onCreateAnimation
for each Fragment
but still not working
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…