Fix of no icons.

master
Tomasz Półgrabia 2016-10-04 20:58:58 +02:00
parent 0b861b0881
commit 94d57f6c46
1 changed files with 6 additions and 5 deletions

View File

@ -60,11 +60,12 @@ public class PlacesAdapter extends ArrayAdapter<GooglePlaceResult> {
ImageView placePreviewWidget = (ImageView)resultView.findViewById(R.id.place_img_preview); ImageView placePreviewWidget = (ImageView)resultView.findViewById(R.id.place_img_preview);
placePreviewWidget.setImageBitmap(BitmapFactory.decodeResource(getContext().getResources(), R.drawable.noimage)); placePreviewWidget.setImageBitmap(BitmapFactory.decodeResource(getContext().getResources(), R.drawable.noimage));
if (photoUrl != null ) {
ImageLoader.getInstance().displayImage( ImageLoader.getInstance().displayImage(
photoUrl != null ? photoUrl : item.getIcon(), photoUrl,
placePreviewWidget, placePreviewWidget,
MainActivity.options); MainActivity.options);
}
resultView.setTag(item.getId()); resultView.setTag(item.getId());