Note that there are some explanatory texts on larger screens.

plurals
  1. POAnchor point skipped when re-opening WebView + android
    text
    copied!<p>I have a WebView that launches a local HTML-file. The URL has an anchor suffix to an anchor point in the HTML. It works fine opening up the WebView the first time, the view is scrolled down to the anchor point correctly. But the next time I open it it fails and the scroll is moved several lines below where I want it to be... </p> <p>This is how I write it:</p> <pre><code>public void createFaqWebView(String url) { faqDialog = null; faqBuilder = null; faqWebView.removeAllViews(); faqWebView = (WebView) getLayoutInflater().inflate( R.layout.am_faq_info_popup, null ); faqWebView.loadUrl( url ); faqBuilder = new AlertDialog.Builder( AMImapExchange.this ); faqBuilder.setIcon( R.drawable.info_button_header ); faqBuilder.setTitle( R.string.info_pop_title ); faqBuilder.setInverseBackgroundForced( true ); faqBuilder.setView( faqWebView ); faqBuilder.setPositiveButton( getText( R.string.ok ), new DialogInterface.OnClickListener() { @Override public void onClick( DialogInterface dialog, int which ) { imapInfoButton.setEnabled( true ); imapInfoButtonHolder.setEnabled( true ); exchangeButton.setEnabled( true ); exchangeInfoButtonHolder.setEnabled( true ); } } ); faqBuilder.setOnCancelListener( new DialogInterface.OnCancelListener() { @Override public void onCancel( DialogInterface dialog ) { imapInfoButton.setEnabled( true ); imapInfoButtonHolder.setEnabled( true ); exchangeButton.setEnabled( true ); exchangeInfoButtonHolder.setEnabled( true ); } }); faqDialog = faqBuilder.create(); faqDialog.show(); } </code></pre> <p>I try and "neutralizing" all parameters of the WebView when it is opened so that opening it again is like opening it for the first time, but I don't seem to get it to work. =(</p> <p>Anyone have any ideas of how I can sort this out?!?! Would be greatly appreciated!</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