How to add JavaScript support webview in android studio?

package com.example.webnure;

import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.os.Build;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.webkit.JavascriptInterface;
import android.webkit.WebResourceRequest;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;


public class MainActivity extends AppCompatActivity {

@SuppressLint("SetJavaScriptEnabled")
@Override
 protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
 WebView webView = new WebView(this);
setContentView(webView);
 webView.setWebViewClient(new WebViewClient());
webView.loadUrl("https://nure.ua/");


}

}


How to add JavaScript in webview?
March 23rd 20 at 19:17
1 answer
March 23rd 20 at 19:19
Solution
Found
webSettings.setJavaScriptEnabled(true); webSettings.setDomStorageEnabled(true);
 webSettings.setLoadWithOverviewMode(true); webSettings.setUseWideViewPort(true); 
 webSettings.setBuiltInZoomControls(true); webSettings.setDisplayZoomControls(false);
 webSettings.setSupportZoom(true); webSettings.setDefaultTextEncodingName("utf-8");
And what to look for it.
https://developer.android.com/reference/android/we... - russell41 commented on March 23rd 20 at 19:22
And why the heck clog this toaster? Or you first write the question here and then in Google? - wilber commented on March 23rd 20 at 19:25

Find more questions by tags AndroidJava