OSDN Git Service

WebView's scrollBarStyle need to be set at init
authorTeng-Hui Zhu <ztenghui@google.com>
Tue, 15 Feb 2011 01:01:16 +0000 (17:01 -0800)
committerTeng-Hui Zhu <ztenghui@google.com>
Tue, 15 Feb 2011 01:05:47 +0000 (17:05 -0800)
At initialization time of WebView, the View's scrollBarStyle is set
according to the xml file.
But WebView didn't pick that info up to specialize its own variable.

The fix is to call WebView's setScrollBarStyle according to the View's
ScrollBarStyle at the init() time.
This will help Gmail to pick up the scrollBarStyle from xml file
correctly.

bug:3409308

Change-Id: I3792b12a36bd989b6c31e0054ebacce4269300da

core/java/android/webkit/WebView.java

index a7b12a0..96699ad 100644 (file)
@@ -1175,6 +1175,8 @@ public class WebView extends AbsoluteLayout
 
         mOverscrollDistance = configuration.getScaledOverscrollDistance();
         mOverflingDistance = configuration.getScaledOverflingDistance();
+
+        setScrollBarStyle(super.getScrollBarStyle());
     }
 
     /**