Android 视图翻转闪烁
我有一个 ViewFlipper,其中动态添加了多个视图。我重写 onTouchEvent (和 onInterceptTouchEvent)以获得视图上的向下、移动和向上事件,这样我就知道何时向左和向右设置动画。
现在一切工作正常,除了在滑动开始时有一个小闪烁(其他视图之一瞬间显示在顶部)。这仅在第一次滑动完成后发生。
我查看了 Android 上主屏幕应用程序的源代码,这很有帮助,但他们不使用 ViewFlipper,所以有点不同。
有人遇到同样的问题吗?
谢谢!
I have a ViewFlipper with multiple views added dynamically. I override onTouchEvent (and onInterceptTouchEvent) in order to get the down, move and up events on the views, so I know when to animate left and right.
Now everything works fine, except that there is a small flicker (one of the other views is displayed on top for a split second) at the beginning of the swipe. This only happens after the first swipe is done.
I looked at the source code for the Home screen app on Android, which helped a lot, but they don't use the ViewFlipper, so it's a little different.
Did anyone encounter the same problem?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论