0

Hello: Here is the question:

I've got a custom view. It's shape is an rounded rectangle. (as drawn in its onDraw Method). I've got a Bitmap that I want to set it as background. I can use the method:

void drawBitmap (Bitmap bitmap, Rect src, Rect dst, Paint paint)

To scale the image to rectangle smaller thant the shape of my view but I would like for it to occupy the whole view. Is there any way to crop the image corners so the match a rounded rectangle?

aarelovich
  • 5,140
  • 11
  • 55
  • 106
  • have a look at [this question](http://stackoverflow.com/questions/2459916/how-to-make-an-imageview-to-have-rounded-corners) – Christian Mar 15 '14 at 18:39
  • to close the question, the link again as an answer: have a look at [this question](http://stackoverflow.com/questions/2459916/how-to-make-an-imageview-to-have-rounded-corners) – Christian Mar 15 '14 at 19:07
  • Strange, i can not post it as an answer, he always converts it to a comment. – Christian Mar 15 '14 at 19:08

1 Answers1

0

To close the question, I am posting the comment with a bit more text.

The answer can be found in the following question:

How to make an ImageView with rounded corners?

Community
  • 1
  • 1
Christian
  • 4,596
  • 1
  • 26
  • 33