我需要旋轉一個佈局(有一個TextView和ImageView),它應該放置在RelativeLayout右對齊和頂部。我創建了我的佈局,這個佈局放在右上角。但是,如果我旋轉它,我不能對齊。我該怎麼辦?旋轉一個佈局,並放置在relativeLayout項目
我相對佈局
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:background="@drawable/background"
android:layout_height="wrap_content"
android:id="@+id/testRL">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:id="@+id/testRotateLL">
<ImageView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:background="@drawable/picture_border_offer_first_page" />
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="7000TL"
android:textSize="15sp"
android:layout_centerInParent="true"
android:textColor="@android:color/white"
android:id="@+id/amountLayoutTV" />
</RelativeLayout>
</RelativeLayout>
我旋轉這個的LinearLayout動畫。這種旋轉好,..
<rotate
xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="0"
android:toDegrees="45"
android:pivotX="50%"
android:pivotY="50%"
android:fillEnabled="true"
android:detachWallpaper="true"
android:duration="0"
android:fillAfter="true">
</rotate>
後旋轉的新visial是..