gpt4 book ai didi

使用xml从右上角到左下角的Android动画

转载 作者:太空宇宙 更新时间:2023-11-03 12:18:29 25 4
gpt4 key购买 nike

我正在尝试从右侧的操作栏打开一个对话框。我想让动画从右上角加载到左下角。这是我所拥有的,但它从左上角加载到右下角。我试图改变它无济于事。感谢您的帮助。

<?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>

最佳答案

抱歉,比赛晚了几个月,但最好的方法和推荐的方法是

<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>

做到这一点的正确方法是使用动画应该来自的轴心点

关于使用xml从右上角到左下角的Android动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24922434/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com