Image image = images.get(position); Bitmap bitmap = image.getBitmap(); if (bitmap != null) { // set your image view with the bitmap } else { image.load(); }
private void init(String fileName, URL fURL, boolean silent) { imageName = fileName; if (imageName.isEmpty() || fURL == null) { return; } fileURL = fURL; if (ImagePath.isImageBundled(fURL)) { imageIsBundled = true; imageName = new File(imageName).getName(); } beSilent = silent; load(); }
protected BufferedImage get(boolean shouldLoad) { if (bimg != null) { if (fileURL == null) { log(lvl + 1, "getImage inMemory: %s", imageName); } else { log(lvl + 1, "getImage from cache: %s", imageName); } return bimg; } else { if (shouldLoad) { return load(); } else { return null; } } }
} else { if (Settings.getImageCache() > 0) { img.load();