java - 如何在android中旋转带有动画的东西
问题描述
我是android新手,我正在学习动画。我发现我们可以使用选择器中的项目并应用为背景。如何使用动画旋转 ImageView?
解决方案
在视图(xml)中,您可以使用:
android:rotation="15" // that’s means 15 degrees
以编程方式:您可以使用旋转,例如 TextView
my_textview.rotation = 15F
//Animation:
my_textview.animate()
.setDuration(600)
.rotation(15f)
.start()
推荐阅读
- java - 如何让 ServletFilter 处理嵌入式 Jetty 中的欢迎文件?
- excel - 如何创建一个“汇总”单元格,聚合列中的唯一值?
- android - Expo构建忽略了Android Manifest
- angular - 当我添加布局模块时,Angular Flex 布局抛出错误
- android - 为什么 Android Studio 从插件部分移除“Android drawable importer”?
- python - 在同一水平网格上获取具有不同比例的绘图的刻度
- django - 预期的字符串或类似字节的对象 Django PostgreSQL 错误
- mysql - 为什么我在使用 Group By 时在 MySQL 中出现语法错误?
- java - setIcon 根本不显示图像
- html - 为外包设计师导出 Angular 2+ 模板