Reputation: 1365
I have a gridview in my activity and I wanted to make its scrollbar always visible.
Anyone know how to do it?
Thankyou.
Upvotes: 7
Views: 3970
Reputation: 4208
To make the scrollbar always visible in an Android view add the following property to the relevant container in the layout xml
android:scrollbarFadeDuration="0"
Refer this.
Specifically for Android 4.0.3
API level 15 you can use,
android:fadeScrollbars
It defines whether to fade out scrollbars when they are not in use. Must be a boolean value, either "true" or "false". Source.
Using code the View.setScrollbarFadingEnabled(boolean) is what you can use.
Upvotes: 10