title: Open HTML file from assets folder
body: <p>I am trying to open local html file in my Android application.</p>
  
  <p>The file is located under my assets folder. So I am setting a WebViewClient and loading my page into it.
  But I get a "webpage not available" error.</p>
  
  <p>Here is my Activity code :</p>
  
  <pre><code>public class LocalDialogActivity extends Activity {
  
      protected WebView webView;
      private static final String ENROLLMENT_URL = "file:///assets/enrollment.html";
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_local_dialog);
  
          webView = (WebView)findViewById(R.id.local_dialog_webview);
          webView.setWebViewClient(new WebViewClient());
  
          webView.getSettings().setUseWideViewPort(true);
          webView.getSettings().setLoadWithOverviewMode(true);
  
          webView.getSettings().setSupportZoom(true);
          webView.getSettings().setBuiltInZoomControls(true);
          webView.getSettings().setDisplayZoomControls(false);
  
  
          refreshWebView(webView);
  
      }
  
      public void refreshWebView(View view) {
          webView.loadUrl(ENROLLMENT_URL);
      }
  </code></pre>
  
  <p>and the layout file:</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"&gt;
  
      &lt;WebView
          android:id="@+id/local_dialog_webview"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>And i have internet permission in my AndroidMainfest.xml file that has access to the internet:</p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  </code></pre>
  
  <p>Any help would be welcome.
  Thank you.</p>