B4J Question B4J Webview.Loadhtml - strange

peacemaker

Expert
Licensed User
Longtime User
Hi, All

Strange, but if to use WebView.LoadHtml("any string") - the view is blank at the first call, but Windows Explorer window (app dir) ... is opened (Win10).
Second calls works OK - HTML is shown as must.

What is it ?
 

DonManfred

Expert
Licensed User
Longtime User
B4X:
Sub Button1_Click
    'xui.MsgboxAsync("Hello World!", "B4X")
    webview.LoadHtml($"<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>{{pagetitel}}</title>

  <!-- Google Font: Source Sans Pro -->
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="dist/css/adminlte.min.css">
</head>
<body>
    <p>Test</p>
</body>
</html>"$)
End Sub

Works for me. At 1st call, at 2nd call, at x. call....
 
Upvote 0
Top