Skip to content
Advertisement

Webview from Android Studio does show a navigation menu and background logo

Context
I’m trying to implement a webview for my website, using Android Studio and Java. Here is the code for

  • MainActivity.java
JavaScript
  • AndroidManifest.xml
JavaScript
  • activity_main.xml
JavaScript

Problem
My webview does not show the navigation menu (dots) and the banner. The following two screenshots show my webview (left) and the website itself (right).

enter image description here

The solution from this post did not help. Namely, I tried these:

JavaScript

Can anyone suggest to me what I can do here?

Advertisement

Answer

If the site is https. Webview does not allow resources that are http to be uploaded.
There are several ways to solve this problem:

1- Change Http Files To Https In Your Site.
For example, for your site, the image source in the post-14.css file:

http://neurofinance.rf.gd/wp-content/uploads/2021/07/бэк-1.png
To
https://neurofinance.rf.gd/wp-content/uploads/2021/07/бэк-1.png

and ….

2-
A-If you’re targeting API level 26 or above, you must first enable it in the manifest file. Add

JavaScript

into <application> tag.

B-Use the following command for WebView:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement