机器人旋转动漫精品 [英] android rotate animation quality
本文介绍了机器人旋转动漫精品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个旋转的动画而我把它应用到一个视图,这里是code:
I have a rotation animation which I am applying it to a view, here is the code:
RotateAnimation shake = new RotateAnimation(-3, 3, 10, 10);
shake.setRepeatCount(Animation.INFINITE);
shake.setRepeatMode(Animation.REVERSE);
shake.setDuration(SHAKE_ANIMATION_DURATION);
不过,虽然玩动漫,我的观点的利润率得到的像素化的:
But while playing animation, my view's margins get pixelated:
有没有办法来解决这个问题?
Is there a way to fix this?
推荐答案
在你加载图像,设置消除锯齿标志。
在XML:
When you load your image, set the Anti-alias flag.
In XML:
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/tile"
android:tileMode="disabled"
android:antialias="true"/>
在飞:
ImageView iv = (ImageView) findViewById(R.id.image);
((BitmapDrawable)iv.getDrawable()).setAntiAlias(true);
这篇关于机器人旋转动漫精品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文