Android text view of screen

I have a problem with my project I have a long text which goes off screen and I need a scrollview I fixed that however now my text goes off screen to the right it dosent stay all compact in anyone have any suggestions? I want my text to be in and fully visable as well as having a scroll since its a lot.

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent"
android:gravity="center_horizontal">

<ScrollView
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:gravity="center_horizontal"
        android:weightSum="1">
        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/abouthusky"
            android:id="@+id/abouthusky"
            android:ellipsize="middle"
            android:layout_weight=".5"
            android:layout_alignParentBottom="true"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"

            />
    </LinearLayout>
</ScrollView>


Source: xml

Leave a Reply