I am using below code to open up an infowindow in my map:
//Define popup
private View popup=null;
mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter(){
@Override
public View getInfoWindow(Marker marker) {
return null;
}
@Override
public View getInfoContents(final Marker marker) {
if(popup == null){
popup = getLayoutInflater().inflate(R.layout.custom_adress,null);
}
final ImageView customadresimage = (ImageView) popup.findViewById(R.id.customadresimage); //my imageview
Picasso.get().load(marker.getSnippet()).resize(200,200).into(customadresimage); //save and show photo from firebase
return popup;
}
});
When I clicked pin, photo dont show firstly, when i clicked secondly, photo is shown.