Skip to content Skip to sidebar Skip to footer

Prevent Scrollbar From Hiding On Froyo

Starting with 2.2, scrollbars would disappear once the scrolling has stopped. Is there a way to make them always visible like before?

Solution 1:

A helper method:

publicstaticvoid 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
    }
}

Solution 2:

What about View.setScrollbarFadingEnabled(boolean fadeScrollbars)? This is available since API level 5.

Solution 3:

Post a Comment for "Prevent Scrollbar From Hiding On Froyo"