title: Android - Draw border around ImageView
body: <p>I have defined an imageView and it I want to do two actions: Round its edges and draw a colored border around the bitmap. First I get it well, but the second one does not.</p>
  
  <p>This is what I have done with canvas:</p>
  
  <pre><code>    Bitmap resizedBitmap = Bitmap.createScaledBitmap(bm, 150, 150, false);
  
      int min = Math.min(resizedBitmap.getWidth(), resizedBitmap.getHeight());
  
       Bitmap bitmapRounded = Bitmap.createBitmap(min, min, resizedBitmap.getConfig());
  
                  Canvas canvas = new Canvas(bitmapRounded);
                  Paint paint = new Paint();
                  paint.setAntiAlias(true);
                  paint.setShader(new BitmapShader(resizedBitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP));
                  canvas.drawRoundRect((new RectF(0.0f, 0.0f, min, min)), min / 2, min / 2, paint);
  
  
      avatar.setImageBitmap(bitmapRounded);
  
      //I tried this, but don't work. 
      avatar.setPadding(1, 1, 1, 1);
      avatar.setBackgroundColor(getResources().getColor(R.color.negro));
  </code></pre>
  
  <p>Thanks you!</p>