Reputation: 57186
Starting with 2.2, scrollbars would disappear once the scrolling has stopped.
Is there a way to make them always visible like before?
Upvotes: 0
Views: 502
Reputation: 57186
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
}
}
Upvotes: 3
Reputation: 12455
What about View.setScrollbarFadingEnabled(boolean fadeScrollbars)
? This is available since API level 5.
Upvotes: 2