Android的 - 使用动画文物 [英] Android - Artifacts using Animation

查看:110
本文介绍了Android的 - 使用动画文物的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我申请的3D转换时,其在屏幕上的视觉假象问题找到<一href=\"http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/animation/Rotate3dAnimation.html\">here.我已经改变这个所以它围绕x轴,而不是在y旋转。当我做一个完整的180°旋转(顶部到底离你先)在即时消息,这是适用于所有其他观点的底部区域(底部10-20%)获得单像素线的文物。我使用的是选择一个的LinearLayout的背景,然后将这个动画吧。谁能想到一个快速的解决这个问题的?

I am having a problem with visual artifacts on the screen when applying the 3D transformation found here. I have changed this so it rotates around the x axis instead of the y. When i do a full 180 rotation (top going away from you at first) im getting single pixel line artifacts at the bottom area (bottom 10-20%) of every other view that this is applied to. I am using a selector as the background of a LinearLayout and then applying this Animation to it. Can anyone think of a quick solution to this issue?

感谢您的帮助!

推荐答案

原来你只需要在每一步的动画父视图无效。如果你有一个自定义动画对象,你可以做这里面Animation.applyTransformation(...)

Turns out you just have to invalidate the parent view on each animation step. If you have a custom Animation object you can just do this inside Animation.applyTransformation(...)

这篇关于Android的 - 使用动画文物的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆