Ich habe ein einfaches Android-Projekt, das eine leere Aktivität Seite mit einem Knopf in der Mitte ist. Ich will, wenn ich auf den Knopf klicke, dreht es sich 180 Grad (Wie das Bild, das Spiel zusammenpaßt, wenn man auf den Knopf zurückkehrt und die Hintergrundshow klickt).Android Button Animation Spin 180 Grad
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:showIn="@layout/activity_main" tools:context=".MainActivity">
<Button
android:layout_width="400px"
android:layout_height="400px"
android:id="@+id/btn_play"
android:layout_marginTop="174dp"
android:background="#001eff"
android:layout_centerHorizontal="true" />
Sorry für mein schlechtes Englisch und meine einfache Frage.
Danke.
Schreiben Sie Ihren 'onClick'-Code so weit. ;) –