Finish off java API to allow fading scrollbars
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index a39faae..ed32af2 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -5321,12 +5321,24 @@
initScrollCache();
final ScrollabilityCache scrollabilityCache = mScrollCache;
scrollabilityCache.fadeScrollBars = fadeScrollbars;
- if (!fadeScrollbars) {
+ if (fadeScrollbars) {
+ scrollabilityCache.state = ScrollabilityCache.OFF;
+ } else {
scrollabilityCache.state = ScrollabilityCache.ON;
}
}
/**
+ *
+ * Returns true if scrollbars will fade when this view is not scrolling
+ *
+ * @return true if scrollbar fading is enabled
+ */
+ public boolean isScrollbarFadingEnabled() {
+ return mScrollCache != null && mScrollCache.fadeScrollBars;
+ }
+
+ /**
* <p>Specify the style of the scrollbars. The scrollbars can be overlaid or
* inset. When inset, they add to the padding of the view. And the scrollbars
* can be drawn inside the padding area or on the edge of the view. For example,