I have a uri
of image from firebase
but i don't know how to load it into bitmap, because i needed to cut the four corner edge of the image.
I tried it with resource id
by providing drawable icon and it does worked fine, but not working from uri
Below is my code:
uri imagefile = model.getImageUri();
if (imagefile !=null){
imageView.setVisibility(View.VISIBLE);
Resources res = c.getResources();
//How i'm loading the image
Bitmap src = BitmapFactory.decodeResource(res,
Integer.parseInt(imagefile));
RoundedBitmapDrawable dr =
RoundedBitmapDrawableFactory.create(res, src);
dr.setCornerRadius(Math.max(src.getWidth(), src.getHeight()) /
30.0f);
imageView.setImageDrawable(dr);
}
How to load image using uri
? It will help me to solve other related issues as well. Thanks