0

This the default way to make TextView scrollable:-

TextView txtView = (TextView)findViewById(R.id.book_detail);
txtView.setMovementMethod(new ScrollingMovementMethod());
txtView.setText("someLongStringHere");

but I think this is not working properly, when ever finger leaves the screen, it stop scrolling, which is can not say user friendly design.

Is there any way to make it in good way ? like we have in iOS verocity scrolling.

Monty
  • 3,155
  • 8
  • 31
  • 60

1 Answers1

3

Use this.

<ScrollView
    android:id="@+id/myScrollview"
    android:layout_width="match_parent"
    android:layout_height="250dp"">

    <TextView
        android:id="@+id/myTextview"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/longString" />
</ScrollView>
stealthjong
  • 9,992
  • 13
  • 42
  • 83