0
我在android中是begginer。在我的應用程序中,我有textview有多行文本,它可能有15-20行。我想在該文本視圖中垂直自動滾動文本。那麼解決方案是什麼?垂直自動滾動textview與特定時間間隔的文本android
這裏是我的XML代碼:
<LinearLayout
android:id="@+id/Thumbnail"
android:layout_width="fill_parent"
android:layout_height="200dp"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:gravity="center"
android:background="@drawable/imgres">
<ScrollView
android:id="@+id/sv"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true" >
<TextView
android:id="@+id/tv"
android:layout_width="fill_parent"
android:layout_height="200dp"
android:background="#80000000"
android:width="200dp"
android:textStyle="bold"
android:textColor="#ffffff"
android:gravity="center"
android:layout_alignParentTop="true"
android:focusable="true"
android:focusableInTouchMode="true"
android:scrollbars = "vertical"
android:maxLines="10"
/>
</ScrollView>
</LinearLayout>
在功能我一直在使用下面的代碼設置我的TextView的文本:
tv.setText(textArray);
你檢查這http://stackoverflow.com/questions/11184054/android-auto-scrolling-text-in-textview –
我已經檢查[鏈接](http://stackoverflow.com/questions/11184054/ android-auto-scrolling-text-in-textview)。但我想要垂直滾動。你有任何的飲料? – zanky