Skip to main content

Posts

Showing posts with the label webview

how to get html content from a webview?

which is the most simplest method to get html code from webview. i have tried several methods from stackoverflow and google.but cant find an exact method.please mention an exact way. public class htmldecoder extends Activity implements OnClickListener,TextWatcher { TextView txturl; Button btgo; WebView wvbrowser; TextView txtcode; ImageButton btcode; LinearLayout llayout; int flagbtcode; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.htmldecoder); txturl=(TextView)findViewById(R.id.txturl); btgo=(Button)findViewById(R.id.btgo); btgo.setOnClickListener(this); wvbrowser=(WebView)findViewById(R.id.wvbrowser); wvbrowser.setWebViewClient(new HelloWebViewClient()); wvbrowser.getSettings().setJavaScriptEnabled(true); wvbrowser.getSettings().setPluginsEnabled(true); wvbrowser.getSettings().setJavaScriptCanOpenWindowsAutomatically(true); wvbrowser.addJavascriptInterfa

How to load a xml into a webview android

I have an xml file and I want to load the xml content to a web view where the web view will be inflated to a gallery. I have parsed and able to get the parsed values, but how do I load the xml content to a web view? I have no clue about it. Please some one help me.