1

I have implemented viewpager with some webviews as its child (using PagerAdapter). When I run this in Kindle devices (I have tested with Kindle HD) during swipe I see a gray overlay during page transition and it disappear when transition finish. I do not have any custom animation. Same thing I run in Nexus 7 and there is no gray overlay which is expected behavior.

My webview initialization as follows:

@Override
public Object instantiateItem(ViewGroup container, final int position) {
    WebView webView = new WebView(this.ctx);
    webView.setWebViewClient(new MyWebViewClient());
    webView.setVerticalScrollBarEnabled(false);
    webView.setVerticalFadingEdgeEnabled(false);
    webView.setInitialScale(100);
    webView.setHorizontalFadingEdgeEnabled(false);
    webView.setHorizontalScrollBarEnabled(false);
    webView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
    webView.setScrollbarFadingEnabled(false);
    webView.setBackgroundColor(Color.WHITE);
    webView.setDrawingCacheBackgroundColor(Color.WHITE);

    webView.getSettings().setBuiltInZoomControls(false);
    webView.getSettings().setJavaScriptEnabled(true);
    webView.getSettings().setRenderPriority(WebSettings.RenderPriority.HIGH);
    webView.getSettings().setAllowFileAccess(true);
    webView.getSettings().setSupportMultipleWindows(false);
    container.addView(webView);

    loadAsyncData(webView, position);

    return webView;
}

Has anyone faced this problem? Any suggestions to solve this problem?

Screenshot

Mohammad Haque
  • 565
  • 1
  • 7
  • 16

1 Answers1

0

Found the root cause. Its the default background on Kindle Fire.

Mohammad Haque
  • 565
  • 1
  • 7
  • 16