3

How can I hide the scrollbars in the CrossWalk webview?

I've tried the following things:

  • Applying this to the Webview layout XML

    android:scrollbars="none"

  • Using javascript/css:

    document.body.style.overflow = 'hidden';
    
  • Everything suggested in this SO question: Hiding the scroll bar in WebView

Any ideas?

Community
  • 1
  • 1
dthomasen
  • 826
  • 15
  • 32

1 Answers1

-1

To disable scrollbars in webview, put the following instructions in the webview code:

WebView.setVerticalScrollBarEnabled(false);
WebView.setHorizontalScrollBarEnabled(false);

In this way, the scrolling will work without the scrollbars.

Stefano
  • 389
  • 2
  • 15
  • I've also tried this (from the SO question I've linked to. It doesn't work). Can you confirm that it works for you with CrossWalk webview? (Because then I can start to look for whatever else might be causing this). – dthomasen Sep 17 '14 at 07:09
  • Never tried with CrossWalk. At this point, you need to verify why this scrollbar have been shown. Is it part of the webview or is it coming from Crosswalk? – Stefano Sep 17 '14 at 07:21
  • I think it's default behavior for the CrossWalk webview. I'll take a look at it, and see if something pops up. Thanks never the less. :-) – dthomasen Sep 17 '14 at 07:22