3

I am trying to get fading edges working for Android 4.1. I've figured out I need "android:requiresFadingEdge", but now instead of a fade, I get a solid block that appears on the top/bottom when I'm scrolling.

<WebView
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:fadingEdge="vertical"
    android:fadingEdgeLength="20dp"
    android:overScrollMode="never"
    android:requiresFadingEdge="vertical" />

Has anyone seen this before?

Jonik
  • 80,077
  • 70
  • 264
  • 372

1 Answers1

3

Got same problem on Android 4.0.3

Solution for me: Disable hardware acceleration for WebView:

if (Build.VERSION.SDK_INT >= 11) {
    webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
}
drlue
  • 1,143
  • 9
  • 8
  • I don't remember what I did, but this makes sense. –  Feb 07 '13 at 18:01
  • This works, but makes the vertical scrolling choppier. I can't believe Google hasn't addressed this yet as it makes the layout less aesthetically pleasing... – Matt W Mar 26 '13 at 19:30