title: How to Make an ImageView in Circular Shape?
body: <p>I want to do something like that.</p>
  
  <p><img src="https://i.stack.imgur.com/Srv9f.png" alt="image in List view"></p>
  
  <p>This is a list view row with name and the image of user.</p>
  
  <p>I have done some searching and have done the image circular,but not the perfect solution.
   Any help will be helping me.</p>
  
  <p>my code added to the Image Loader class</p>
  
  <pre><code>public Bitmap processBitmap(Bitmap bitmap) {
      int pixels = 0;
      if (mRound == 0)
          pixels = 120;
      else
          pixels = mRound;
      Bitmap output = Bitmap.createBitmap(bitmap.getWidth(),
              bitmap.getHeight(), Config.ARGB_8888);
      Canvas canvas = new Canvas(output);
  
      final int color = 0xff424242;
      final Paint paint = new Paint();
      final Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight());
      final RectF rectF = new RectF(rect);
      final float roundPx = pixels;
  
      paint.setAntiAlias(true);
      canvas.drawARGB(0, 0, 0, 0);
      paint.setColor(color);
      canvas.drawRoundRect(rectF, roundPx, roundPx, paint);
  
      paint.setXfermode(new PorterDuffXfermode(Mode.SRC_IN));
      canvas.drawBitmap(bitmap, rect, rect, paint);
  
      return output;
  }
  </code></pre>
  
  <p>Thanks.</p>