summaryrefslogtreecommitdiffstats
path: root/core/java/android/view
diff options
context:
space:
mode:
authorMike Cleron <mcleron@google.com>2009-09-28 18:21:37 -0700
committerMike Cleron <mcleron@google.com>2009-09-28 18:31:09 -0700
commit52f0a6495277469bd7ede29ef89bc34cb2aa8a85 (patch)
tree37ef20b6b713f9bddf55a5f95e94372e84eec528 /core/java/android/view
parent8f76734d1e9a21618ad9762c0716ee93f60902ec (diff)
downloadframeworks_base-52f0a6495277469bd7ede29ef89bc34cb2aa8a85.zip
frameworks_base-52f0a6495277469bd7ede29ef89bc34cb2aa8a85.tar.gz
frameworks_base-52f0a6495277469bd7ede29ef89bc34cb2aa8a85.tar.bz2
Finish off java API to allow fading scrollbars
Diffstat (limited to 'core/java/android/view')
-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 a39faae..ed32af2 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,