title: Android WebView Javascript enabled
body: <p>activity_main.xml</p>
  
  <pre><code>&lt;WebView  xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/webView"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  /&gt;
  </code></pre>
  
  <p>MainActivity.java</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      WebView webView =(WebView)findViewById(R.id.webView);
      webView.getSettings().setJavaScriptEnabled(true);
      webView.setWebViewClient(new WebViewClient());
      WebSettings webSettings = webView.getSettings();
      webSettings.setJavaScriptEnabled(true);
      webSettings.setDomStorageEnabled(true);
      webView.getSettings().setJavaScriptEnabled(true);
      webView.getSettings().setDomStorageEnabled(true);
      webView.loadUrl("file:///android_asset/www/index.html");
  }
  </code></pre>
  
  <p>i have this code, but javascript is not working :(</p>