ZeeShaN AbbAs
ZeeShaN AbbAs

Reputation: 1365

how to make gridview scroll bar always visible android 4.0.3

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

Answers (1)

Parth Doshi
Parth Doshi

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

Related Questions