OSDN Git Service

Enable fading scrollbar for the Browser
authorGrace Kloba <klobag@google.com>
Tue, 29 Sep 2009 04:24:51 +0000 (21:24 -0700)
committerGrace Kloba <klobag@google.com>
Tue, 29 Sep 2009 04:24:51 +0000 (21:24 -0700)
Fix http://b/issue?id=2151115

res/layout/browser_subwindow.xml
src/com/android/browser/TabControl.java

index 5b00bf7..0eb9e72 100644 (file)
@@ -30,6 +30,8 @@
             <WebView android:id="@+id/webview"
                 android:layout_width="fill_parent"
                 android:layout_height="fill_parent"
+                android:fadeScrollbars="true"
+                android:scrollbarStyle="outsideOverlay"
                 android:layout_weight="1" />
         </LinearLayout>
     </FrameLayout>
index 3de60a3..2f15a9c 100644 (file)
@@ -1022,6 +1022,8 @@ class TabControl {
     private WebView createNewWebView() {
         // Create a new WebView
         WebView w = new WebView(mActivity);
+        w.setScrollbarFadingEnabled(true);
+        w.setScrollBarStyle(View.SCROLLBARS_OUTSIDE_OVERLAY);
         w.setMapTrackballToArrowKeys(false); // use trackball directly
         // Enable the built-in zoom
         w.getSettings().setBuiltInZoomControls(true);