The simplest way to create a Scrolling TextView in android is to place it inside a ScrollView.
Here is a sample xml file with a scrollable TextView.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
<ScrollView
	android:layout_width="fill_parent"
	android:layout_height="wrap_content"
	android:fillViewport="true">
	<LinearLayout
		android:layout_width="fill_parent"
		android:layout_height="fill_parent">
	<TextView android:text="sample text "
		android:id="@+id/tv"
		android:layout_width="fill_parent"
		android:layout_height="fill_parent">
	</TextView>
	</LinearLayout>
</ScrollView>
</LinearLayout>
 

Leave a Reply

Your email address will not be published. Required fields are marked *

 

 

 

Theme by HermesThemes

Copyright © 2018 CoderzHeaven. All Rights Reserved

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.