Android Code Snippet GoogleMapsextra custom infowindow

i try changue default view color of infowindow to transparent

I don't know if there is an easier way

I succes it with this code

Transparent Info window:
            sub InfoAdaptador_GetInfoContents(Marca As Marker) As View
                'edit layout components from infopanel
             
               infoPanel.Parent.Color = Colors.Transparent
                return infoPanel
            end sub

this code only works second time show infowindow
i solve this add fake marker and show this (Release Mode)
B4X:
     FakeMark = gmap.AddMarker(0,0,"Fake")
        FakeMark.Snippet=0
        FakeMark.InfoWindowShown=True
        FakeMark.Remove

and add to GetInfoContents

B4X:
Sub InfoAdaptador_GetInfoContents(Mark As Marker) As View

    Try
        If Mark.Snippet = 0 Then
            Return infoPanel
        Else 'Normal operation

             'Work with panel

              infoPanel.Parent.Color = Colors.Transparent
        End If
     
        Catch
        Log(LastException.Message)
    End Try
    Return infoPanel
End if

This is not the most elegant solution but it works!!!

I would like to know if there is another option, I think that the library already has a defined layout so it is necessary to hide it.
 
Last edited:

Daica

Active Member
Licensed User
Hi,

I'm getting "infoPanel.Parent" does not have any objects or functions. Are you doing something else different?
 

TILogistic

Expert
Licensed User
Longtime User
Read:



See:

 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…