我想要一个按钮(作为图像)只在界面上顺时针旋转。我不想要在点击按钮时旋转。只在 XML 文件中旋转就足够了。android:rotation 对我来说不起作用。
我的代码是
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="New Button"
android:background="@drawable/button"
android:rotation="-90"
android:id="@+id/button"
android:layout_gravity="right|left"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true" />