Android版谷歌地图V2标题或摘要字符串从HTML [英] Android Google Maps V2 Title or Snippets Strings From HTML

查看:159
本文介绍了Android版谷歌地图V2标题或摘要字符串从HTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是工作在Android谷歌地图V2项目,我需要写一些HTML code(如页面),并实现它以谷歌标志的标题或片段。

Hi i'm working on a google maps v2 project on Android and i need to write a bit HTML code (like a page) and implement it to google marker's title or snippet.

我知道有喜欢的方式:<一href=\"http://wptrafficanalyzer.in/blog/customizing-infowindow-contents-in-google-map-android-api-v2-using-infowindowadapter/\" rel=\"nofollow\">http://wptrafficanalyzer.in/blog/customizing-infowindow-contents-in-google-map-android-api-v2-using-infowindowadapter/在这里,但我需要写的 HTML codeS ,因为这项工作后的我将使用这些$ C $再次在CS另一个移动项目。

I know there are ways like : http://wptrafficanalyzer.in/blog/customizing-infowindow-contents-in-google-map-android-api-v2-using-infowindowadapter/ here but i need to write HTML codes because after this work i will use these codes again in another mobile project.

任何帮助将是AP preciated,谢谢

Any help would be appreciated, thanks

推荐答案

根据此页,你可以自定义的信息窗口的内容和设计。结果
如果是这样,那么你可以定义一个自定义布局几个 TextViews ,然后是很容易设置它的HTML文本:

According to this page, you are able to customize the content and design of info windows.
If this is so, then you could define a custom layout with few TextViews, which then is very easy to set html text in it:

Spanned spannedContent = Html.fromHtml(htmlString);
textView.setText(spannedContent, BufferType.SPANNABLE);

此外,你可能想看看,浏览这些示例项目如何以不同的方式使用地图V2。

Also, you may want to take a look and browse these example projects on how to use Map V2 in various ways.

这篇关于Android版谷歌地图V2标题或摘要字符串从HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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