rotate FAB and the shadow is clipped
<?xml version="1.0" encoding="utf-8"?>
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/overshoot_interpolator"
android:duration="300"
android:propertyName="rotation"
android:valueFrom="135f"
android:valueTo="0f" >
</objectAnimator>
第一个动画师
<?xml version="1.0" encoding="utf-8"?>
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/overshoot_interpolator"
android:duration="300"
android:propertyName="rotation"
android:valueFrom="0f"
android:valueTo="135f" >
</objectAnimator>
第二个动画师
mExpandMenuAnimator = (ObjectAnimator)AnimatorInflater.loadAnimator(this,R.animator.fab_clockwise_animator);
mCollapsedMenuAnimator = (ObjectAnimator) AnimatorInflater.loadAnimator(this,R.animator.fab_anticlockwise_animator);
mFab = (FloatingActionButton)findViewById(R.id.home_fab);
mExpandMenuAnimator.setTarget(mFab);
mCollapsedMenuAnimator.setTarget(mFab);
mFab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (i == 0){
i = 1;
mCollapsedMenuAnimator.start();
}else{
i = 0;
mExpandMenuAnimator.start();
}
}
});
FAB是支持lib FAB,以及如何解决阴影剪切问题, 或者只是旋转src drawable并不旋转所有FAB,但是怎么做?