在Android的ViewPager视差效应视差、效应、Android、ViewPager

由网友(不流泪的眼)分享简介:我想效仿的视差效果,通过我的片段滑动的时候,我读过有关beginFakeDrag和fakeDragBy但说实话,我不知道,即使是我的问题的最佳方法。I'm trying to emulate a parallax effect when sliding through my fragments, I've read...

我想效仿的视差效果,通过我的片段滑动的时候,我读过有关beginFakeDrag和fakeDragBy但说实话,我不知道,即使是我的问题的最佳方法。

I'm trying to emulate a parallax effect when sliding through my fragments, I've read about beginFakeDrag and fakeDragBy but to be honest, I don't know even if it's the best approach to my problem.

任何人都做过与ViewPager类似的东西,或有一个关于我应该如何处理这个提示?

Anyone has done something similar with the ViewPager or have a hint about how should I approach this?

感谢您

推荐答案

这个问题是有点老了,但我发现,当我试图做的正是这...

This question is a bit old, but I found it when I was trying to do exactly that...

我实现了自己的解决方案,基本上延伸 ViewPager 并覆盖的OnDraw

I implemented my own solution, basically extending ViewPager and overriding onDraw.

您可以找到所有的code用一个简单的例子这里

You can find all the code with a simple example here

阅读全文

相关推荐

最新文章