Answer the question
In order to leave comments, you need to log in
WebView does not display a site without an SSL certificate, i.e. http pages what to do?
package com.site.dasdadsd.dadadsad;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.KeyEvent;
import android.webkit.WebSettings;
import android.webkit.WebView;
public class MainActivity extends AppCompatActivity {
private WebView webView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
webView = (WebView) findViewById(R.id.webView);
WebSettings webSettings = webView.getSettings();
webSettings.setJavaScriptEnabled(true);
SimpleWebViewClientImpl webViewClient = new SimpleWebViewClientImpl(this);
webView.setWebViewClient(webViewClient);
webView.loadUrl("https://kontur-extern.net/");
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if ((keyCode == KeyEvent.KEYCODE_BACK) && this.webView.canGoBack()) {
this.webView.goBack();
return true;
}
return super.onKeyDown(keyCode, event);
}
}
Answer the question
In order to leave comments, you need to log in
Solution to your problem -
https://stackoverflow.com/questions/45940861/andro...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question