Is this effect possible in viewpager?

我只是一个虾纸丫 提交于 2020-01-14 12:54:14

问题


I am using ViewPager in Activity. I need to have this effect between pages flipping.

I have never seen such kind of effect other than in the flipping between home screens of Android. If you have used this animation or if you have heard the name of animation please help me. I don't have any ideas about this animation.


回答1:


This effect is called cover flow. In this link you can find the code for making a cover flow effect.

You also have another animation effect in Android which is called page curl. Check it out if you are interested in another animation style.




回答2:


It's actually a custom view that extends SmoothPagedView -> PagedView -> ViewGroup. A good place to look is at the Android launcher source. It's actually quite complicated, but com.android.launcher2.Workspace [link] in Android 4.1.1 should give you an idea of what is done.

It seems the 3D-looking outline you see is created by HolographicOutlineHelper, and there are 3D effects applied to the individual CellLayouts (or pages).



来源:https://stackoverflow.com/questions/12257067/is-this-effect-possible-in-viewpager

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!