Android的 - 使用动画文物文物、动画、Android

2023-09-08 09:34:33 作者:我们正年轻 有何不可

我申请的3D转换时,其在屏幕上的视觉假象问题找到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(...)