public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_browser_detail);
Bundle browserDetailBundle = getIntent().getExtras();
if(browserDetailBundle!= null)
{
detailsToBrowse = browserDetailBundle.getString("EditTextContent");
if (!detailsToBrowse.startsWith("http://") && !detailsToBrowse.startsWith("https://"))
detailsToBrowse = "http://" + detailsToBrowse;
viewToBrowse = (View)findViewById(R.id.editTextBrowser);
}
callMe(viewToBrowse);
}
public void callMe(View v){
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(detailsToBrowse));
startActivity(i);
}
Q
浏览器没有被加载
-1
A
回答
0
确保,你detailsToBrowse
开始 “http://
” 或 “https://
”
if (!detailsToBrowse.startsWith("http://") && !detailsToBrowse.startsWith("https://"))
detailsToBrowse = "http://" + detailsToBrowse;
,改变你的方法
public void callMe(View v){
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(detailsToBrowse);
startActivity(i);
}
相关问题
- 1. Chrome浏览器不加载页面,Safari浏览器没有
- 2. 没有浏览器加载栏
- 3. 是一个显示的图像:没有被浏览器加载?
- 4. CustomdataGrid没有被显示在浏览器
- 5. Girdview没有被显示在浏览器
- 6. JS在火狐浏览器中工作,但没有在Chrome浏览器和IE浏览器中加载。
- 7. ReactiveX/RxJS 5在浏览器中没有任何加载器?
- 8. Vue路由器没有加载URL输入到浏览器
- 9. IE浏览器没有加载所有页面请求
- 10. 有没有办法停止浏览器的页面加载?
- 11. 浏览器扩展:有没有办法停止加载图像?
- 12. IE浏览器没有加载所有图像
- 13. 运行预加载只有内容没有在浏览器中
- 14. 浏览器加载文件
- 15. 检测浏览器加载
- 16. 重新加载浏览器
- 17. webview浏览器不加载
- 18. 在页面加载时,mypic.jpg是否会被浏览器下载?
- 19. Ascx页面没有加载到浏览器
- 20. 页面没有加载时,从浏览器刷新在角JS
- 21. 点击网址栏上没有重新加载浏览器
- 22. Chrome浏览器没有加载样式表
- 23. 响应没有结束,浏览器不断加载 - nodejs和graphicsmagick
- 24. 在IE浏览器的asp.net中没有加载Javascript文件
- 25. 即使没有使用浏览器加载的@ font-face字体?
- 26. Selenium打开浏览器,但没有加载页面
- 27. Rails - 没有这样的文件加载 - 浏览器[宝石]
- 28. 浏览器外的选项没有加载控件
- 29. WordPress的 - Chrome浏览器没有安全地加载ajax googleapis -
- 30. 没有任何来源加载到浏览器的struts2中
你想那里做什么? ?试图在进入此活动后立即加载浏览器?或'callMe(View v)'应该是一个按钮事件? – Rigotti