The World’s Largest Online Community for Developers

'; Android marker Infowindow on click - LavOzs.Com

hi i have a question about infowindow on android google map.

        public View getInfoWindow(Marker arg0) {
            return null;

like this picture infowindow with menus

i want to make a infowindow with other menu inside of it. when i click Directions then google map will shown up, and if i click another text will show another activity. i know that picture from goole map javascript

        public View getInfoWindow(Marker arg0) {
            return null;

this cannot be done.

from the docs

The info window that is drawn is not a live view. The view is rendered as an image (using View.draw(Canvas)) at the time it is returned. This means that any subsequent changes to the view will not be reflected by the info window on the map. To update the info window later (for example, after an image has loaded), call showInfoWindow(). Furthermore, the info window will not respect any of the interactivity typical for a normal view such as touch or gesture events. However you can listen to a generic click event on the whole info window as described in the section below.

so the window is not an active view just an image, the best you can do is show a dialog when the info windo is clicked

Is there a way to run Python on Android?
How to save an activity state using save instance state?
Close/hide android soft keyboard
How to stop EditText from gaining focus at Activity startup in Android
Is there a unique Android device ID?
What is 'Context' on Android?
Proper use cases for Android UserManager.isUserAGoat()?
Google Maps Android API v2 - Interactive InfoWindow (like in original android google maps)
Android map infowindow on click marker