I want to scroll text down and up vertically, incase the text to appear in the textview is longer than the space. However, the below methods I tested, do not work.
1 - tv1.setMovementMethod(new ScrollingMovementMethod()); Moreover, upon using this method, calls to onFling() method stop to work.
2 - using <ScrollView> in layout XML. also, when using this method, calls to onFling() method stop to work.
<ScrollView android:id="@+id/SCROLLER_ID" android:layout_width="fill_parent" android:layout_height="wrap_content" android:scrollbars="vertical" android:fillViewport="true"> <TextView android:id="@+id/TEXT_STATUS_ID" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0"/> </ScrollView> my TextView in layout XML is the following.
<TextView android:id="@+id/textView1" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="2.26" android:background="@drawable/green" android:gravity="center" android:text="Large Text" android:textAppearance="?android:attr/textAppearanceLarge" />