We are showing a notification with a large icon get from an URL. So, in order to load the image we are using Universal Image Loader with the following code:
mImageLoader.loadImage(imagePath, new SimpleImageLoadingListener() {
@Override
public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {
notificationBuilder.setLargeIcon(loadedImage);
notificationManager.notify(notification.getId(), notificationBuilder.build());
}
});
This code is working fine and the image is successfully shown. Our problem is that we want to show a circular large icon, so we need the bitmap to be circular. We have tried by setting:
final DisplayImageOptions imageOptions = new DisplayImageOptions.Builder()
.displayer(new RoundedBitmapDisplayer(1000))
.build();
But this is not working, we've tried with RoundedBitmapDrawable, but we need a bitmap and not a bitmapdrawable. Please, how could we do in order to get a circular bitmap?
Thanks in advance.