title: Images with rounded corners in a ListView
body: <p>I have developed an rss application. I want the ListView which contains the titles and images to have the images with rounded corners. I have taken a sample code online, but the problem is that the images are still rectangular. The weird part is that I have a sliding menu, when toggled it pushes the rss ListView away, while it's being pushed the images have round corners! when they stop their pushing animation the become rectangular again. It's a pretty weird problem for me so any help?
  Rounded Image class:</p>
  
  <pre><code>public class RoundedImageView extends ImageView
  {
      private float radius = 20.0f;
  
      public RoundedImageView(Context context) 
      {
          super(context);
      }
  
      public RoundedImageView(Context context,AttributeSet attrs)
      {
          super(context,attrs);
      }
  
      public RoundedImageView(Context context,AttributeSet attrs,int defStyle)
      {
          super(context,attrs,defStyle);
      }
  
      @SuppressLint("DrawAllocation")
      @Override
      protected void onDraw(Canvas canvas)
      {
          Path clipPath = new Path();
          RectF rect = new RectF(0,0,getWidth(), getHeight());
          clipPath.addRoundRect(rect, radius, radius, Path.Direction.CW);
          canvas.clipPath(clipPath);
          super.onDraw(canvas);
      }
  }
  </code></pre>