[ACCEPTED]-Android TextView Scrollable-textview

Accepted answer
Score: 26

In your XML layout file:

<TextView
    android:id="@+id/message_scroll"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:scrollbars="vertical"
    android:text="@string/lorem" />

In your Java class 1 file:

TextView tv = (TextView) rootView.findViewById(R.id.message_scroll);
tv.setMovementMethod(new ScrollingMovementMethod());
Score: 5

Wrap your textview in a scrollview:

<ScrollView
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" >
        <TextView  
            android:id="@+id/tv1"
            android:layout_width="fill_parent" 
            android:layout_height="fill_parent" 
            android:maxLength="16"
            android:scrollbars = "vertical"
            android:ellipsize="end"
            android:text="fdgdddhhhdhd" />
</ScrollView>

0

Score: 1

Your android:maxlength="16" limits 2 the number of characters that can be placed 1 in the TextView to 16

According to the developer site

More Related questions