简体   繁体   中英

Android - Create a Slide in Slide Out Animation for webViews in a ViewPager

I've implemented webViews within a ViewPager, but instead of the default animation (as seen with Launcher), I want to have a sliding animation.

Let's say I have 2 webviews. If I flick to the right, the left webview moves out of view and to the left and eventually becomes non visible, then the right webview moves left and becomes fully visible. I need there to be an instant where nothing appears on the viewPager during the transition.

Is this easily done with viewPager or do I have to scrap it and work with Animations completely?

I have found a good source to do it with pure animation but it may be hard to implement for webviews: http://blog.stylingandroid.com/archives/137

Thanks in advance.

viewpager doesn't match to your needs I think. use ViewFlipper instead and you can custom in/out animations.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM