Finish off java API to allow fading scrollbars

This commit is contained in:
Mike Cleron
2009-09-28 18:21:37 -07:00
parent 8f76734d1e
commit 52f0a64952
2 changed files with 24 additions and 1 deletions

View File

@@ -5321,11 +5321,23 @@ 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