【发布时间】:2012-02-24 04:02:06
【问题描述】:
我有一个应用程序,其中包含一个选项卡小部件。其中一个选项卡为我加载了一个 webview,但加载不正确。当我在我的手机浏览器中加载相同的地址时,它加载得很好。这是我正在使用的 webview 的代码
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;
public class Sermons extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
WebView webview = new WebView(this);
setContentView(webview);
// Simplest usage: note that an exception will NOT be thrown
// if there is an error loading this page (see below).
webview.loadUrl("http://canyonculberts.com/ucc/?page_id=93");
webview.getSettings().setBuiltInZoomControls(true);
webview.setInitialScale(1);
webview.getSettings().setAppCacheEnabled(false);
}
}
任何人对我可以做些什么不同以使其正常工作有什么想法吗?感谢您的帮助
【问题讨论】: