Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/180.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 如何使移动按钮可单击_Android_Xml_Android Layout_Kotlin - Fatal编程技术网

Android 如何使移动按钮可单击

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

我为一个视图编写了一个旋转动画,其中有两个按钮,anim xml:

<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中放置的位置单击,如何使按钮实际可移动