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.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 {

 protected void onCreate(Bundle savedInstanceState) {
 WebView webView = new WebView(this);
 webView.setWebViewClient(new WebViewClient());



How to add JavaScript in webview?
March 23rd 20 at 19:17
1 answer
March 23rd 20 at 19:19
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. - 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