在web视图Android手机的Twitter页面不开放? [英] android mobile twitter page in webview not opening?

查看:223
本文介绍了在web视图Android手机的Twitter页面不开放?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 Android中的WebView 打开微博页面开始时以https。但它是不开放和黑屏即将与连续负载。屏幕截图低于

I am trying to open twitter page begining with https in webview in android. But it is not opening and blank screen is coming with continous loading. Screen shot is below

编辑:在主要的WebView我有链接的Twitter页面 https://twitter.com/mytwitterpage 。在点击链接,Twitter的网址是开放的web视图。我注意到,WebViewClient的onPageFinished方法被调用2次一次的 https://twitter.com/mytwitterpage 和第二次 https://开头mobile.twitter.com /#!/ mytwitterpage

In main webview I have link to twitter page https://twitter.com/mytwitterpage. On clicking that link that twitter url is opening in webview. I noticed that onPageFinished method of WebViewClient is called 2 times one time for https://twitter.com/mytwitterpage and second time for https://mobile.twitter.com/#!/mytwitterpage.

任何人都知道这里有什么问题?

Anyone know what is wrong here?

在此先感谢。

推荐答案

通过添加以下线在我的code OK完成

Ok done by adding below line in my code

webView.getSettings().setUserAgentString("Mozilla/5.0 (Linux; U; Android 2.0; en-us; Droid Build/ESD20) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17");

我从这个岗位在计算器<一个得到它href="http://stackoverflow.com/questions/6856814/problems-loading-mobile-twitter-in-webview">Problems装载mobile.twitter中的WebView 。

这篇关于在web视图Android手机的Twitter页面不开放?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆