Skip to content

Commit

Permalink
Loader fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ackava committed Aug 30, 2024
1 parent cde5781 commit c032eb4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 10 additions & 1 deletion Positron/Platforms/Android/Controls/NativeWebView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,19 @@ protected override void OnHandlerChanged()
PlatformView.SetWebChromeClient(new PositronWebViewChromeClient(webViewHandler));
PlatformView.SetWebViewClient(new PositronWebViewClient(webViewHandler, this));
this.PlatformView.AddJavascriptInterface(new JSBridge(this), "androidBridge");

this.PlatformView.Settings.MediaPlaybackRequiresUserGesture = false;
this.PlatformView.Settings.LoadsImagesAutomatically = true;
this.PlatformView.Settings.AllowContentAccess = true;
this.PlatformView.Settings.SavePassword = false;
this.PlatformView.Settings.SaveFormData = false;
this.PlatformView.Settings.SetGeolocationEnabled(true);
Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific.Application
.SetWindowSoftInputModeAdjust(this.Window, WindowSoftInputModeAdjust.Resize);

BackButtonInterceptor.Instance.InterceptBackButton(() => {
this.PlatformView.EvaluateJavascript("typeof androidPressBackButton !== 'undefined' && androidPressBackButton();", null);
});

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ public PositronWebViewClient(WebViewHandler handler, PositronWebView nativeWebVi

this.platformView = handler.PlatformView;
this.positronWebView = nativeWebView;


}

public override void OnPageStarted(global::Android.Webkit.WebView? view, string? url, Bitmap? favicon)
Expand Down

0 comments on commit c032eb4

Please sign in to comment.