【发布时间】:2015-10-12 06:45:06
【问题描述】:
我以如此简单的方式旋转FAB:
fab.startAnimation(AnimationUtils.loadAnimation(this, R.anim.rotate));
rotate.xml:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<rotate
android:fromDegrees="0"
android:toDegrees="360"
android:pivotX="50%"
android:pivotY="50%"
android:duration="1000"/>
</set>
这可行,但它的阴影与 FAB 一起旋转。但我只需要旋转 FAB(甚至它的 src 图像,如果有任何区别)。
【问题讨论】:
-
我在 FAB 上旋转 ImageView 的解决方案 stackoverflow.com/questions/29426138/…
标签: android rotation android-animation floating-action-button