<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/RelativeLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/bg2x" >
<LinearLayout
android:id="@+id/linear"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center"
android:layout_alignParentTop="true"
android:background="#FF00FF00"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textColor="#FF000000"
android:textSize="70dp"
android:text="test linearlayout"
/>
</LinearLayout>
Now I wanna Rotate the “linear” layout by 90 degrees. * And I dont wanna use Animation*, is there any other way to achive this?
Please help me.Thanks in advance!!
Since you don’t need animation, from API 11 or above, you can use
to rotate in XML itself. If you want to do it in code, say after a button click, then you can use its java equalant too
But not before API 11. See documentation.
EDIT: After seeing comment
I think you can have to rotate the view yourselves. And I believe the lchorus and Pete’s answer in this thread does work. For Pete’s answer he is using animation, but you can set animation duration of 0 to do it without any visible animation. There is no other straight forward way as far as I know..