Adding buttons to map infowindow android

In the new Google Maps for Android API v2, I can very easily get custom markers and info windows to display. However, I’m trying to have multiple buttons inside of my info window, that each perform a different onClick action but the problem is, the map treats the InfoWindow as it’s own button object (no matter where I click on the InfoWindow, it presses the entire thing). Does anyone know how to customize this a bit more?

  • How to detect input data through the audio jack?
  • How to create fireworks particle graphics effect on android
  • Android SplashScreen
  • How to move SearchView 's search Icon to the right side?
  • Programmatically change input type of the EditText from PASSWORD to NORMAL & vice versa
  • Drawable as Background for CardView
  • Related posts:

    Android Layout views rotated and spaced around a circle?
    MarkerClick works but InfoWindowClick does not open ViewModel
    How to install an older version of Android Studio
    Android - Change Actionbar Title Text Color
    Android - Independent Fragment UI testing tool
    Secure element Access Control on ICS 4.0.4
  • How to get minimum Hardware requirement for android application
  • Android Studio 2.2 preview 1 EditText error
  • android turning on wifi programmatically
  • Open link from Android Webview in normal browser as popup
  • how to disable a tab in android screen?
  • One Solution collect form web for “Adding buttons to map infowindow android”

    Just found this in the documentation.

    As mentioned in the previous section on info windows, an info window
    is not a live View, rather the view is rendered as an image onto the
    map. As a result, any listeners you set on the view are disregarded
    and you cannot distinguish between click events on various parts of
    the view. You are advised not to place interactive components — such
    as buttons, checkboxes, or text inputs — within your custom info

    Unfortunately, that answers it. I was trying to add the same function as you.

    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.