Note that there are some explanatory texts on larger screens.

plurals
  1. POandroid webview Related
    text
    copied!<p>I have multiple html files which i saved in the assets folder. one of my html file is:</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt; &lt;title&gt;Untitled Document&lt;/title&gt; &lt;style type="text/css"&gt; .outer{width:300px; height:460px; padding:10px;} &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;div class="outer"&gt; &lt;h4 style="text-align:right; margin-bottom:30px; width:300px;"&gt;&lt;a href="#0"&gt;HOME&lt;/a&gt;&lt;/h4&gt; &lt;h1&gt;World Map -01&lt;/h1&gt; &lt;img src="world_map.png" width="300" alt="" /&gt; &lt;h4 style="text-align:right; margin-top:30px; width:300px;"&gt;&lt;a href="#2"&gt;NEXT&lt;/a&gt;&lt;/h4&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>there is 3 more html file is as same as this. The first page will loads. here I want to get the href and load the links manually by checking the href.</p> <p>My code is:</p> <pre><code>public class WebvwActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); WebView web=(WebView) findViewById(R.id.web); web.getSettings().setJavaScriptEnabled(true); web.loadUrl("file:///android_asset/demo.html"); } } </code></pre> <p><strong>What i want to do for fetching the href value and load the links by checking the href value??</strong></p> <p>Thanks in advance</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload