某些网址不会加载到webview中

时间:2012-04-19 20:36:27

标签: android url webview loading

我有一个工作的webview,我修改加载不同的网址。此网站无法加载。它只显示一个空白的碎片,是的,我有正确的权限。这是代码:

公共类PowerSchoolActivity扩展了Activity {

private static final String TAG = "PowerSchool 2";
public static final String url = null;
private WebView mWebView;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.main);
    Log.i(TAG, "onCreate");
    mWebView = (WebView) findViewById(R.id.webview);
    mWebView.getSettings().setJavaScriptEnabled(true);
    mWebView.getSettings().setBuiltInZoomControls(true);
    mWebView.getSettings().setSupportZoom(true);
    mWebView.getSettings().setSupportMultipleWindows(true);
    mWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
    mWebView.loadUrl("https://pschool.fsd1.org/teachers/pw.html");
    mWebView.setWebViewClient(new PowerSchoolClient());
    WebView myWebView = (WebView) findViewById(R.id.webview);
    myWebView.setWebViewClient(new WebViewClient());
}

1 个答案:

答案 0 :(得分:1)