0

So I've setup an InfoWindow with the following XML:

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

<ImageView
    android:layout_width="150dp"
    android:layout_height="150dp"
    android:id="@+id/marker_image"
    android:layout_gravity="center_horizontal"
    android:maxHeight="75dp"
    android:maxWidth="75dp" />
...

I then set the image of the ImageView from the Activity using the ImageLoader library:

ImageLoader imageLoader = ImageLoader.getInstance();
imageLoader.displayImage(imageLocation, mainImage, options, new ImageLoadingListener() {
                        @Override
                        public void onLoadingStarted(String s, View view) {
                            Log.v("IMAGELOADER_started", "Started Loading");
                        }

                        @Override
                        public void onLoadingFailed(String s, View view, FailReason failReason) {
                            Log.v("IMAGELOADER_failed", failReason.toString());

                        }

                        @Override
                        public void onLoadingComplete(String s, View view, Bitmap bitmap) {
                            Log.v("IMAGELOADER_complete", "before");
                            mainImage.setImageBitmap(bitmap);
                            boolean hasDrawable = (mainImage.getDrawable() != null);
                            if(hasDrawable) {
                                Log.v("IMAGEVIEW","has image");
                            }
                            else {
                                Log.v("IMAGEVIEW","no image");
                                // no image assigned to image view
                            }
                            //(ImageView) view.findViewById(R.id.marker_image).setImageBitmap(bitmap);
                            Log.v("IMAGELOADER_complete", "after");
                        }

                        @Override
                        public void onLoadingCancelled(String s, View view) {

                        }
                    });

Now the logs report that the image was loaded successfully and that the image is indeed inside the ImageView. However it does not load on the InfoWindow, only the text does.

map

Edit: This question is different as in this instance the image does not show at all.

user1686342
  • 1,265
  • 1
  • 18
  • 24
  • possible duplicate of [Android GoogleMap 2 update information dynamically in InfoWindow with ImageView via Universal Image loader](http://stackoverflow.com/questions/16144341/android-googlemap-2-update-information-dynamically-in-infowindow-with-imageview) – Ziem Mar 14 '15 at 18:15
  • I've had a look but a different question, specifically mine does not display the image at all. – user1686342 Mar 14 '15 at 18:46

0 Answers0