Starting with 2.2, scrollbars would disappear once the scrolling has stopped.
Is there a way to make them always visible like before?
views:
38answers:
3
+2
A:
What about View.setScrollbarFadingEnabled(boolean fadeScrollbars)
? This is available since API level 5.
mreichelt
2010-10-05 10:05:46
A:
There is also the XML value if you wish to define this in your XML layout file.
android:scrollbarAlwaysDrawHorizontalTrack="true"
android:scrollbarAlwaysDrawVerticalTrack="true"
You can also set a delay if you actually want the fading just not quite so fast!
android:scrollbarDefaultDelayBeforeFade="500"
Blundell
2010-10-05 13:11:19
A:
A helper method:
public static void disableScrollbarFading(View view) {
try {
Method setScrollbarFadingEnabled = View.class.getDeclaredMethod(
"setScrollbarFadingEnabled", boolean.class);
setScrollbarFadingEnabled.setAccessible(true);
setScrollbarFadingEnabled.invoke(view, false);
} catch (Exception e) {
// OK, API level < 5
}
}
alex
2010-10-05 14:34:41