its simple as possible by using this util method
/*
* param@ imageView is your image you want to bordered it
*/
public static Bitmap generateBorders(ImageView imageView){
Bitmap mbitmap = ((BitmapDrawable) imageView.getDrawable()).getBitmap();
Bitmap imageRounded = Bitmap.createBitmap(mbitmap.getWidth(), mbitmap.getHeight(), mbitmap.getConfig());
Canvas canvas = new Canvas(imageRounded);
Paint mpaint = new Paint();
mpaint.setAntiAlias(true);
mpaint.setShader(new BitmapShader(mbitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP));
canvas.drawRoundRect((new RectF(0, 0, mbitmap.getWidth(), mbitmap.getHeight())), 100, 100, mpaint);// Round Image Corner 100 100 100 100
return imageRounded;
}
then set your image view bitmap with returned value have fun