如何使用图像旋转或缩放图像视图?Image View 的 Size 是 Wrap_Content 和 Rotate or Scale Image on Touch Event of Image view。
请帮我。
如何使用图像旋转或缩放图像视图?Image View 的 Size 是 Wrap_Content 和 Rotate or Scale Image on Touch Event of Image view。
请帮我。
您可以Animation
在 ImageView 上使用。这是旋转动画的示例:
Animation anim = new RotateAnimation(0, ANGLE, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
anim.setDuration(DURATION);
anim.setRepeatCount(0);
anim.setFillAfter(true);
image_view.startAnimation(anim);
您可以为缩放和平移动画找到类似的解决方案。如果您不想看到动画,请将持续时间设置为零。setFillAfter
如果您不想在动画后重置图像,这很重要。祝你好运