2

WebView successfully renders html page even if the screen is off on android version pre 8.0/8.1 But it doesn't on Android 8.1. I wonder why? Maybe somebody could give me a hint how can I affect on this behaviour.

Any help would be very appreciated!

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
  • 2
    Why do you want to render content if the screen is off? – PPartisan Aug 06 '18 at 09:17
  • I don't want to see web view loading after the screen is switched on. I need that it was already loaded before. So when you switch the screen on, the HTML page is already ready. – Roman Lebedenko Aug 06 '18 at 09:27

1 Answers1

1

Probably, WebSettings.setOffscreenPreRaster(true) is what you're looking for.

a.ch.
  • 8,285
  • 5
  • 40
  • 53