Android动画 - 将按钮变换为FAB

问题描述:

我有一个按钮,我想要将它变换为FAB。请参阅下面的动画以供参考。有人可以让我知道如何做到这一点。Android动画 - 将按钮变换为FAB

enter image description here

+0

我不认为按钮变成了FAB。点击它循环隐藏,并且“ProgressBar”变得可见,并且循环显示以下屏幕。为了实现更平滑的过渡,视图交叉渐变。请查看以下链接,了解如何在android中使用循环显示/隐藏功能 - http://lgvalle.xyz/2015/06/07/material-animations/ – Mithun

<?xml version="1.0" encoding="utf-8"?> 
<set xmlns:android="http://schemas.android.com/apk/res/android" 
    android:interpolator="@android:anim/linear_interpolator"> 

    <scale 
     android:duration="700" 
     android:fillBefore="false" 
     android:fromXScale="1.0" 
     android:fromYScale="1.0" 
     android:pivotX="50%p" 
     android:pivotY="50%p" 
     android:toXScale="0.0" 
     android:toYScale="1.0" /> 

</set> 

这是一个简单的规模的动画。