summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/view/View.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index a39faae5daa1..ed32af2bb62d 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -5321,12 +5321,24 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
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,