使用xml从右上到左下的Android动画
我正试图从右侧的操作栏打开一个对话框。我想从右上角到左下角加载动画。这是我所拥有的,但它从左上角到右下角加载。我试着把它调换一下,但没有用。谢谢你的帮助使用xml从右上到左下的Android动画,android,android-animation,android-xml,Android,Android Animation,Android Xml,我正试图从右侧的操作栏打开一个对话框。我想从右上角到左下角加载动画。这是我所拥有的,但它从左上角到右下角加载。我试着把它调换一下,但没有用。谢谢你的帮助 <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android"> <scale android:fromYScale="0" android:toYScale="1.
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<scale android:fromYScale="0" android:toYScale="1.0"
android:fromXScale="0" android:toXScale="1.0"
android:duration="500"/>
</set>
将对您有所帮助
我试过这样的东西
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/decelerate_interpolator">
<scale
android:fromYScale="0"
android:toYScale="1.0"
android:startOffset="0"
android:duration="1200"
android:fromXScale="0"
android:toXScale="1.0"
android:fillAfter="true" />
<translate android:fromXDelta="100%" android:fromYDelta="-100%"
android:duration="700" />
</set>
很抱歉游戏推迟了几个月,但最好的方法和推荐方法是
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/decelerate_interpolator">
<scale
android:fromYScale="0"
android:toYScale="1.0"
android:startOffset="0"
android:duration="1200"
android:fromXScale="0"
android:toXScale="1.0"
android:fillAfter="true"
android:pivotX="100%" />
</set>
正确的方法是使用动画应该来自的轴点非常感谢您链接的资源。这对我帮助很大。