用比例动画隐藏/显示晶圆厂 [英] hide/show fab with scale animation
本文介绍了用比例动画隐藏/显示晶圆厂的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用自定义的floatactionmenu.我需要在显示/隐藏菜单按钮上实现缩放动画,如下所示 浮动操作 >
I'm using custom floatingactionmenu. I need to implement scale animation on show/hide menu button like here floating action button behaviour
有什么办法吗?
推荐答案
您可以将这些比例动画用于fab按钮,其效果与设计lib fab按钮相同.
You can use these scale animations for fab button, it gives same effect like design lib fab button.
scale_up.xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" >
<scale
android:duration="100"
android:fromXScale="0"
android:fromYScale="0"
android:pivotX="85%"
android:pivotY="85%"
android:toXScale="1.0"
android:toYScale="1.0" />
</set>
scale_down.xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" >
<scale
android:duration="100"
android:fromXScale="1.0"
android:fromYScale="1.0"
android:pivotX="85%"
android:pivotY="85%"
android:toXScale="0"
android:toYScale="0" />
</set>
这篇关于用比例动画隐藏/显示晶圆厂的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文