我正在尝试在webview中加载linkedin页面,但我只能看到linkedin徽标,但我尝试加载facebook和facebook成功。这是我的代码:
public class WebViewActivity extends Activity {
WebView web;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.webview);
web = (WebView) findViewById(R.id.webview01);
web.setWebViewClient(new myWebClient());
web.loadUrl("https://www.linkedin.com");
}
public class myWebClient extends WebViewClient
{
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
// TODO Auto-generated method stub
super.onPageStarted(view, url, favicon);
}
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
}
}
任何人都可以帮助我。提前谢谢。
答案 0 :(得分:0)
您需要在WebView中启用javascript,如下所示: -
web.getSettings().setJavaScriptEnabled(true);