Write long text to display on the Android screen so that the screen will score down

I want to display 2-3 pages of text. I try to use the scroll view, but the text is cut off. I'm a novice in development. Please give a simple example, thanx

resolvent:

This will work, and the trick is to get what you want to scroll through

<RelativeLayout 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" >

    <ScrollView
        android:id="@+id/scrollView1"
        android:layout_width="match_parent"
        android:layout_height="match_parent" >

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent" >

            <TextView
                android:id="@+id/textView1"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:text="@string/text" />

        </LinearLayout>
    </ScrollView>

</RelativeLayout>

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>