In the Java source code, after registering your TextView set the movement method:
Example:
tv_var = (TextView) findViewById(R.id.tv_e);
tv_var.setMovementMethod(ScrollingMovementMethod.getInstance());
Also, in the layout for the TextView XML layout file add a scrollbar style attribute:
Example:
android:scrollbarStyle="insideInset"
Note: The scrollbars appear only if the text in the text view exceeds the layout_height.