Skip to content

Commit

Permalink
Enable JavaScript in WebViewActivity
Browse files Browse the repository at this point in the history
  • Loading branch information
therealsujitk committed Oct 22, 2023
1 parent 63e9170 commit 7cc625e
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package tk.therealsuji.vtopchennai.activities;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.webkit.WebView;
import android.webkit.WebViewClient;
Expand All @@ -14,6 +15,7 @@
public class WebViewActivity extends AppCompatActivity {

@Override
@SuppressLint("SetJavaScriptEnabled")
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_web_view);
Expand All @@ -28,6 +30,7 @@ protected void onCreate(Bundle savedInstanceState) {

WebView webView = findViewById(R.id.web_view);
webView.setWebViewClient(new WebViewClient());
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl(url);
}

Expand Down

0 comments on commit 7cc625e

Please sign in to comment.