Picasso-Problem beim Laden von Bildern in GoogleMap.InfoWindowAdapter

Ich verwende Google Maps Api und möchte beim Klicken auf einen Marker ein Bild in InfoWindow anzeigen. Ich habe es implementiert, aber es gibt ein Problem mit Picasso. Wenn ich auf eine Markierung klicke, wird infoWindow angezeigt und imageView zeigt das Platzhalterbild. Wenn ich noch einmal auf denselben Marker klicke, lädt Picasso das Bild erfolgreich. Ich muss zweimal klicken, es ist so komisch.

Screenshots zum besseren Verständnis:

Klicken Sie zuerst auf die Markierung:

Wenn ich nochmal klicke:

Es gibt meine Codes unten:

InfoWindowAdapter (Picasso wird hier geladen)

mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {
        @Override
        public View getInfoWindow(Marker marker) {
            return null;
        }

        @Override
        public View getInfoContents(Marker marker) {
            View myContentsView = getLayoutInflater().inflate(R.layout.map_info_content, null);
            ImageView imageView = (ImageView) myContentsView.findViewById(R.id.imgView_map_info_content);
            Picasso.with(MainActivity.this)
                    .load(marker.getSnippet())
                    .placeholder(R.drawable.ic_placeholder)
                    .into(imageView);
            return myContentsView;
        }
    });

Setzen von Markierungen (Verwenden des Snippets zum Übergeben der Bild-URL)

for (MediaFeedData item : mItemList) {
        LatLng position = new LatLng(item.getLocation().getLatitude(),
                item.getLocation().getLongitude());
        mMap.addMarker(new MarkerOptions()
                .snippet(item.getImages().getLowResolution().getImageUrl())
                .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_point))
                .position(position));
    }

InfoWindow layout xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<ImageView
    android:id="@+id/imgView_map_info_content"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />

</LinearLayout>

Antworten auf die Frage(4)

Ihre Antwort auf die Frage