Skip to content Skip to sidebar Skip to footer

How To Rotate Textview?

I want to rotate TextView but I can't get proper output. I am getting textView with missing some text In Layout

Solution 1:

Change the main.xml to :

<?xml version="1.0" encoding="utf-8"?><RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="fill_parent"android:layout_height="fill_parent"><TextViewandroid:layout_alignParentLeft="true"android:layout_width="wrap_content"android:layout_height="wrap_content"android:text="TextView"android:layout_marginTop="50dip"android:layout_marginLeft="50dip"android:id="@+id/text1"></TextView></RelativeLayout>

Solution 2:

Added in API level 12

view.animate().rotationBy(90).start()

Post a Comment for "How To Rotate Textview?"