2

Actually im showing some data in a textview but its half of the data is going out of the screen so i need help to make a textview scroll or any other thing that can scroll down the screen.

Any help would be appreciated!

1

3 Answers 3

16

Put your TextView inside ScrollView in XML like:

 <ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent"> <TextView android:id="@+id/txt2" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="txt2"/> </ScrollView> 
Sign up to request clarification or add additional context in comments.

Comments

3

See this

 TextView textview= (TextView) findViewById(R.id.your_textview_id); textview.setMovementMethod(new ScrollingMovementMethod()); 

Comments

1

Just use it this way:

<scrollview (your code) /> 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.