title: Rounded Rectangle with Android Canvas
body: <p>I'm attempting to draw a rectangle around a custom view in Android. I mostly have it working except for one detail.</p>
  
  <p>Here is my code...</p>
  
  <pre><code>Paint paint = new Paint();
  paint.setColor(Color.BLACK);
  paint.setStrokeWidth(14.5f);
  paint.setStyle(Paint.Style.STROKE);
  
  canvas.drawRoundRect(0, 0, getWidth(), getHeight(), 20.0f, 20.0f, paint);
  </code></pre>
  
  <p>And here is the resulting rectangle...</p>
  
  <p><a href="https://i.stack.imgur.com/stfJD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/stfJD.png" alt="enter image description here"></a></p>
  
  <p>As you can see, the inside of the rectangle does have rounded corners, but the outside still draws pointed corners. How can I make it so that the outside corners are rounded as well?</p>