Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It is not true that the KK WebView applies CSS only when visible on screen:</p> <ul> <li><p>the WebView will not size itself if it has visibility set to <code>GONE</code> because the Android framework will call layout-related methods on it (like <code>layout</code> and <code>onSizeChanged</code>). This might be what you're seeing. Try setting the visibility to <code>INVISIBLE</code> instead.</p></li> <li><p><code>WebViewClient.onPageFinished</code> is not a reliable trigger for showing your WebView. What the callback really means is that the resource for the main frame had been loaded from the network. Unfortunately there never was a reliable callback that would tell you 'your content is ready to be displayed' - what you're describing probably happened to work because of particular timing. The most reliable way to not show unfinished content would be to do so in the HTML/CSS.</p></li> <li><p>you might be using <code>WebView.loadDataWithBaseUrl</code> to load your contents into a new/blank WebView - this API is has an effect similar to re-writing the page's content (rather than issuing a 'real' navigation) and can result in weird layout. If possible use <code>loadData</code> or <code>loadUrl</code>. If neither of those are feasible try calling <code>loadUrl("data:text/html,&lt;body style=\"margin: 0px;\"/&gt;");</code> before loading the real content (wait at least till you get an <code>WebViewClient.onPageStarted</code> callback for that bootstrap URL).</p></li> <li><p>you might be setting height to <code>WRAP_CONTENTS</code>. This is very unlikely to cause the issues you're describing, but it would be good to rule out. Try setting a width of <code>MATCH_PARENT</code> and a height with a fixed number of pixels.</p></li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload