title: How to add border in custom imageview?
body: <p>I am working with android.I had created an android app with a custom image view which clip corners of the image. here is my custom image view</p>
  
  <pre><code>public class CustomImage extends ImageView {
  
      public static float radius = 18.0f;  
  
      public CustomImage(Context context) {
          super(context);
      }
  
      public CustomImage(Context context, AttributeSet attrs) {
          super(context, attrs);
      }
  
      public CustomImage(Context context, AttributeSet attrs, int defStyle) {
          super(context, attrs, defStyle);
      }
  
      @Override
      protected void onDraw(Canvas canvas) {
          if (Build.VERSION.SDK_INT &gt; Build.VERSION_CODES.HONEYCOMB) {
              CustomImage.this.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
          }
  
          Path clipPath = new Path();
          RectF rect = new RectF(0, 0, this.getWidth(), this.getHeight());
          clipPath.addRoundRect(rect, radius, radius, Path.Direction.CW);
          canvas.clipPath(clipPath);
          super.onDraw(canvas);
      }
  }
  </code></pre>
  
  <p>it works perfect.But I need to add a border around the clipped Image view .How can I do this?</p>