Java 如何在活动退出前不停止动画
我想制作动画,直到活动之外,动画没有停止,并且一直持续到活动正在运行动画为止 我的动画代码:Java 如何在活动退出前不停止动画,java,android,Java,Android,我想制作动画,直到活动之外,动画没有停止,并且一直持续到活动正在运行动画为止 我的动画代码: <set xmlns:android="http://schemas.android.com/apk/res/android"> <rotate xmlns:android="http://schemas.android.com/apk/res/android" android:fromDegrees="0" android:toDegrees="360" an
<set xmlns:android="http://schemas.android.com/apk/res/android">
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="0"
android:toDegrees="360"
android:pivotX="50%"
android:pivotY="50%"
android:duration="30000" >
</rotate>
请将当前代码发送给我
用代码编写动画并在新线程中运行,否则你最终无法关闭程序?@MaxVitruk:你能给我发送线程代码吗?这就是你需要的吗?或者你需要在应用程序关闭时保持旋转?@MaxVitruk,是的,我想在关闭activitytnx时运行动画亲爱的朋友,但这不起作用。android之后:duration=“10000”动画停止。我想不停地重复,直到退出活动。tnx亲爱的FAHIM
animation.setRepeatCount(Animation.INFINITE);