Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 974
ZeeShaN AbbAs Avatar asked Jul 09 '12 07:07

ZeeShaN AbbAs


1 Answers

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.

like image 52
Parth Doshi Avatar answered Oct 21 '22 08:10

Parth Doshi