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
  • 4,638
  • 10
  • 48
  • 94
  • 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
  • Perfect!! It worked like a Charm. Thank you so much!!!! – aarelovich Mar 15 '14 at 18:54
  • 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,371
  • 1
  • 24
  • 31