0

テキスト領域のテキストをスクロールする際に問題に直面しています。この 1-Scrollview のコード構造は、垂直レイアウトとして次のとおりです。2-このスクロール ビューでビューを保持します。3-このビューでテキスト領域を保持します。

この構造では、テキストがスムーズにスクロールされません。

4

2 に答える 2

1

このコードを探していると思います。

<ScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/headerlayout"
        android:layout_above="@+id/bottomlayout"
         >

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:id="@+id/text_aboutus"
                    android:layout_marginTop="10dp"
                    android:padding="10dp"
                    android:text="@string/text_data"
                    android:textSize="13sp"
                    android:textColor="#000" />



    </ScrollView>
于 2013-08-05T12:15:33.153 に答える
0

テキストビューに水平スクロールが必要な場合は、xmlファイルでこれを試してください

<HorizontalScrollView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">
<TextView
. . . .
</HorizontalScrollView>

テキストビューに垂直スクロールが必要な場合は、アクティビティでこれを試してください

textview.setMovementMethod(ScrollingMovementMethod.getInstance());
于 2013-08-05T11:58:08.273 に答える