Android Textview Wraps and ugly formatting
I have created a android textview field .My problem is i want all text to
come to new line as soon as there is a Enter or "/n" on the line .For
Example :- I have a text line below :-
Twinkle, twinkle, little star,How I wonder what you are.
Up above the world so high,Like a diamond in the sky.
I want this to come as shown below but when i use the below code it wraps
the lines during runtime .Any Idea how can i do this .My Code is below
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".DisplayGanMessageActivity" >
<TextView
android:id="@+id/textView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/title_activity_display_gan_message" />
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignLeft="@+id/textView1"
android:layout_below="@+id/textView1"
android:layout_marginTop="18dp"
android:text="
Twinkle, twinkle, little star,How I wonder what you are.
Up above the world so high,Like a diamond in the sky."/>
I got the below output from this :- Twinkle, twinkle, little star,How I
wonder what you are.Up above the world so high,Like a diamond in the sky
No comments:
Post a Comment