Prevent hiding scrollbar on froyo

Starting from 2.2, the scroll bars disappear as soon as the scroll stops.
Is there a way to make them always visible as before?

0
source share
3 answers

What about View.setScrollbarFadingEnabled(boolean fadeScrollbars) ? It is available from API level 5.

+2
source

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 } } 
+3
source

You can also set this in xml using android: fadeScrollbars = "false".

0
source

Source: https://habr.com/ru/post/898569/


All Articles