Android 设置图像动画按钮调整大小以适应屏幕
我想有一个imagebutton中心屏幕,打开开始“增长”,以使用某种动画平滑地填充整个屏幕。达到全尺寸后,反转动画并返回其原始尺寸Android 设置图像动画按钮调整大小以适应屏幕,android,imagebutton,Android,Imagebutton,我想有一个imagebutton中心屏幕,打开开始“增长”,以使用某种动画平滑地填充整个屏幕。达到全尺寸后,反转动画并返回其原始尺寸 有什么想法吗?这可能吗?下面是一个示例,让您开始使用此布局为动画创建xml文件, res/anim/animate.xml <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/and
有什么想法吗?这可能吗?下面是一个示例,让您开始使用此布局为动画创建xml文件, res/anim/animate.xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<scale
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:fromXScale="1.0"
android:toXScale="2.0"
android:fromYScale="1.0"
android:toYScale="2.0"
android:repeatMode="reverse"
android:duration="700" />
</set>
在此处了解有关动画的更多信息绝对可能,您是否尝试设置动画xml文件?太棒了!非常感谢,我对动画有了新的爱好!还有关于如何设置视图动画以适应屏幕的想法吗?
Animation scaleAnim = AnimationUtils.loadAnimation(this, R.anim.animate);
view.startAnimation( scaleAnim );