Thursday, January 29, 2015

Make TextView scrollable without using ScrollView

2 steps, firstly, set scroll bar rotation in AndroidManifest.xml:
         android:scrollbars="vertical"

Then, set the scrolling method for the TextView, mostly in onCreate() function:
        ((TextView)findViewById(R.id.textview)).setMovementMethod(ScrollingMovementMethod.getInstance());

No comments:

Post a Comment

Thrift fails on Windows - thrift failed error: The command line is too long.

Meet a thrift compiling failure on my project on Windows 7. Using Maven in IntelliJ so I choiced maven-thrift-pluging for thrift files. For ...