简体   繁体   English

Kotlin 中图像的 Y 轴旋转

[英]Y-axis Rotation for Image in Kotlin

I'm asking about how can I Rotate (Y-axis) a picture in ImageView programmatically in kotlin or java for android Studio as showed below I searched a lot.. Googled it.. but no answers Here an example:我问的是如何在 kotlin 或 java for android Studio 中以编程方式旋转(Y 轴) ImageView的图片,如下所示,我搜索了很多。

在此处输入图片说明

Another Example:另一个例子:

在此处输入图片说明

To rotate your image on the Y-Axis, All you have to do is set this on your imageView .要在 Y 轴上旋转您的图像,您所要做的就是在您的imageView上设置它。 Keep in mind this is for Java.请记住,这是针对 Java 的。

imageView.setRotationY(25);

Your image will rotate just like you wanted, you can change the float value if you want.您的图像将按照您想要的方式旋转,您可以根据需要更改浮点值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM