Android 如何使移动按钮可单击
我为一个视图编写了一个旋转动画,其中有两个按钮,anim xml:Android 如何使移动按钮可单击,android,xml,android-layout,kotlin,Android,Xml,Android Layout,Kotlin,我为一个视图编写了一个旋转动画,其中有两个按钮,anim xml: <rotate xmlns:android="http://schemas.android.com/apk/res/android" android:fromDegrees="0" android:toDegrees="360" android:pivotX="50%" android:pivotY=&q
<rotate
xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="0"
android:toDegrees="360"
android:pivotX="50%"
android:pivotY="50%"
android:interpolator="@anim/linear_interpolator"
android:duration="10000"
android:repeatMode="restart"
android:repeatCount="infinite"
android:startOffset="0"
/>
这样做的问题是,按钮的位置似乎固定在屏幕上我将其放在XML中的位置,因此当按钮移动时,单击按钮什么也不做。我尝试使用RotateAnimation类实现旋转动画,但完全相同,按钮只能在XML中放置的位置单击,如何使按钮实际可移动