android - How to set round corner image from bitmap (get image string from server) -
i have tried code image rounder rounded image can not focus face!!! body me?
//bitmap mbitmap = ((bitmapdrawable) getresources().getdrawable(r.drawable.cat)).getbitmap(); bitmap imagerounded = bitmap.createbitmap(result.getwidth(), result.getheight(), result.getconfig()); canvas canvas = new canvas(imagerounded); paint mpaint = new paint(); mpaint.setantialias(true); mpaint.setshader(new bitmapshader(result, shader.tilemode.clamp, shader.tilemode.clamp)); canvas.drawroundrect((new rectf(0, 0, 258, 250)), 120, 120, mpaint);// round image corner 100 100 100 10 // ivphoto.setimagebitmap(result); ivphoto.setimagebitmap(imagerounded);
if rounded imageview you're looking circularimageview
might you, supports .setimagebitmap()
method
check library. pretty easy use.
Comments
Post a Comment