From 94d57f6c466f90019d6ce06e26ef4f510da40fe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20P=C3=B3=C5=82grabia?= Date: Tue, 4 Oct 2016 20:58:58 +0200 Subject: [PATCH] Fix of no icons. --- .../urbanexplorer/adapters/PlacesAdapter.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/pl/tpolgrabia/urbanexplorer/adapters/PlacesAdapter.java b/app/src/main/java/pl/tpolgrabia/urbanexplorer/adapters/PlacesAdapter.java index 926aa59..b6a7a94 100644 --- a/app/src/main/java/pl/tpolgrabia/urbanexplorer/adapters/PlacesAdapter.java +++ b/app/src/main/java/pl/tpolgrabia/urbanexplorer/adapters/PlacesAdapter.java @@ -60,11 +60,12 @@ public class PlacesAdapter extends ArrayAdapter { ImageView placePreviewWidget = (ImageView)resultView.findViewById(R.id.place_img_preview); placePreviewWidget.setImageBitmap(BitmapFactory.decodeResource(getContext().getResources(), R.drawable.noimage)); - - ImageLoader.getInstance().displayImage( - photoUrl != null ? photoUrl : item.getIcon(), - placePreviewWidget, - MainActivity.options); + if (photoUrl != null ) { + ImageLoader.getInstance().displayImage( + photoUrl, + placePreviewWidget, + MainActivity.options); + } resultView.setTag(item.getId());