【问题标题】:Retrieve webview content检索 webview 内容
【发布时间】:2012-01-12 21:37:28
【问题描述】:

我需要检索 WebView 对象的内容。我试图获取 HttpPost 或 Get to work 无济于事(可以在其他地方发布)。
我只是想要将 html 作为文本(请参阅下面的尝试 - load_result 中的某些内容应将其转换为字符串)。

例如。

webview = (WebView) findViewById(R.id.webView1);
webview.loadUrl("http://www.dummy.com");

webview.setWebViewClient(new WebViewClient() {
    // implement your own web view client
    public void onPageFinished(WebView view, String url) {
        load_result();
    }
});

void load_result(){
    String result;

    webview = (WebView) findViewById(R.id.webView1);
    result = new String(webview.toString()); 
}

任何帮助将不胜感激!

【问题讨论】:

    标签: android webview


    【解决方案1】:
    猜你喜欢
    • 1970-01-01
    • 2011-07-12
    • 2015-11-19
    • 1970-01-01
    • 2010-10-06
    • 1970-01-01
    • 2011-11-01
    • 2015-02-06
    • 1970-01-01
    相关资源
    最近更新 更多