Making the vertical scrollbar visible

Ragunath Jawahar picture Ragunath Jawahar · Jan 7, 2011 · Viewed 26.1k times · Source

I want to make the vertical scroll bar permanently visible. Currently the scroll bar appears only when I attempt to scroll the text view enclosed inside the scroll view. This is my XML declaration.

<ScrollView
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_above="@id/radio_group"
    android:layout_margin="5dp"
    android:scrollbars="vertical" 
    android:scrollbarAlwaysDrawVerticalTrack="true" >
    <TextView
        android:id="@+id/question"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:textSize="20sp"
        android:textColor="#FF000000"
        android:textStyle="bold" />
</ScrollView>

Thank you for your time.

Answer

jjb picture jjb · Jan 8, 2011

You can set android:fadeScrollbars="false" in your ScrollView XML.