views:

558

answers:

2

Hey all, what would be best practice for clipping the bottom borders of a Bitmap? Just manipulate the Bitmap itself or overlay an alpha mask drawable or ...?

The whole story:

I've a Listview which looks like the iPhone's grouped UITableView style. I would like to display a Bitmap in the last row, but for now the Bitmap overlaps my custom background drawable of the Listview cell.

Thx in advance!

A: 

I think your answer can be found here: http://stackoverflow.com/questions/1683185/android-listview-with-rounded-corners

RickNotFred
Sry, not really, this thread shows how to set a custom background to the listview (what I've done in a similar way actually), but the content does not get clipped anyway, so my Bitmap would still overlay the rounded corners.alex
alex
+2  A: 

Fyi: I've found this code snippet: http://www.ruibm.com/?p=184 .

As in my case, I only wanted the bottom corners to be rounded, so I added an additional drawRect (with smaller height than the drawRoundRect) to the canvas.

alex