原生Android Google地图应用(如果在设备上提供)将响应标准的http://maps.google.com网址和查询字符串,因此以下内容将起作用:
TextView t = (TextView) findViewById(R.id.mytextview);
t.setText(Html.fromHtml(
"Location " +
"<a href=\"http://maps.google.com/maps?q=1+Infinite+Loop,+Cupertino,+Santa+Clara,+California+95014\">" +
"1 Infinite Loop, Cupertino, Santa Clara, California 95014" +
"</a>"));
t.setMovementMethod(LinkMovementMethod.getInstance());
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3528 次 |
| 最近记录: |