简体   繁体   English

Java Android AlertDialogs在Infowindow OnClick for Google Maps v2上显示

[英]Java Android AlertDialogs Show on infowindow OnClick for google maps v2

i would like to ask a question with regards to AlertDialogs which i would like to use in GoogleMaps V2. 我想问一个关于AlertDialogs的问题,我想在GoogleMaps V2中使用。 I read about the custom InfoWindow documentation from the android developers and noticed that they advised not to put any interaction widgets (Buttons, Textbox etc etc) onto an OnClick function. 我从Android开发人员那里阅读了有关自定义InfoWindow文档的信息,并注意到他们建议不要将任何交互小部件(按钮,文本框等)放置到OnClick函数上。 Now, i would like to know if i could use a default alert dialog and put it into an OnClick function for the custom InfoWindow. 现在,我想知道是否可以使用默认警报对话框并将其放入自定义InfoWindow的OnClick函数中。 Is it possible? 可能吗?

Yes that should work fine. 是的,应该可以。 The reason why you should not (and cannot, really) put interactive elements in an InfoWindow is because the InfoWinow is statically rendered when shown, making any interactive elements you place in it effectively useless. 之所以不应该(也不能真正)将交互元素放入InfoWindow是因为InfoWinow在显示时是静态呈现的,从而使您放置在其中的任何交互元素InfoWinow都变得无用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM