How to create a circular ImageView in Android? [duplicate]

This question already has answers here: How to make an ImageView with rounded corners? (58 answers) Closed 8 years ago. How could I create a rounded ImageView in Android? I have tried the following code, but it’s not working fine. Code: Bitmap circleBitmap = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), Bitmap.Config.ARGB_8888); BitmapShader shader = new BitmapShader (bitmap, TileMode.CLAMP, TileMode.CLAMP); … Read more