在GOOGLEMAPS V2为Android getInfoWindow()和getInfoContents()之间的区别 [英] Difference between getInfoWindow() and getInfoContents() in Googlemaps v2 for Android

查看:671
本文介绍了在GOOGLEMAPS V2为Android getInfoWindow()和getInfoContents()之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

两个问题:


  1. 请告诉我之间的差异公共抽象查看getInfoWindow(标记标记)公共抽象查看getInfoContents(标记标记)

有什么用getInfoContents的()。

What is the use of getInfoContents() .

谷歌地图博客说:(getInfoWindow() )可以提供将用于整个信息窗口的景致。 (getInfoContents()),您可以只自定义窗口的内容,但仍保留默认的信息窗口框架和背景。。任何一个可以请expalin(尝试用现有项目来比较,可能是这样的ListView列项左右)

Google map blog says:(getInfoWindow()) allows you to provide a view that will be used for the entire info window. (getInfoContents()) allows you to just customize the contents of the window but still keep the default info window frame and background. . can any one please expalin(try to compare with an existing item, may be like listView row item or so )

感谢

推荐答案

在上面的截图,我已经使用了 InfoWindowAdapter ,其中我推翻 getInfoContents()。我的 getInfoContents()方法返回的,你看到的图标和文字。我的 getInfoContents() 没有提供矩形泡沫的图标和文本中,而且,我的 getInfoContents() 没有是在那个泡沫一个指向该标记的底部提供插入符号,泡沫等背后的轻微阴影。

In the above screenshot, I have used an InfoWindowAdapter, where I overrode getInfoContents(). My getInfoContents() method returned the icon and text that you see. My getInfoContents() did not provide the rectangular bubble that the icon and text is in. Also, my getInfoContents() did not provide the caret at the bottom of that bubble that points at the marker, the slight drop shadow behind the bubble, etc.

所以,你可以使用 getInfoContents()如果你想要那个长方形泡沫,插入符号,阴影等,如果不这样做,你要提供的完整的信息窗口的视觉重新presentation 的,使用 getInfoWindow()

So, you use getInfoContents() if you want that rectangular bubble, caret, drop shadow, etc. If you do not, and you want to provide the complete info window visual representation, use getInfoWindow().

这篇关于在GOOGLEMAPS V2为Android getInfoWindow()和getInfoContents()之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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