Circular angles on Android Bitmap?

Hi everyone, what would be best for clipping the bottom borders of the bitmap? Just manipulate the bitmap itself or apply an alpha mask or ...?

The whole story:

I have a Listview that looks like an iPhone grouped UITableView style. I would like to display Bitmap on the last line, but at the moment, Bitmap overlaps my custom background image from the Listview cell.

thanks in advance!

+4
source share
3 answers

Fyi: I found this piece of code: http://www.ruibm.com/?p=184 .

As in my case, I would like the bottom corners to be rounded, so I added an extra drawing (with a lower height than drawRoundRect) to the canvas.

+3
source

I think your answer can be found here: How to create a ListView with rounded corners on Android?

0
source

I needed to do the same, but I wanted to do it correctly in XML, and not in java code.

I explained what I did in response to this question: Android XML rounded cropped corners .

It was a makeover that I liked - it can be applied to any layout, with minimal problems. It is very easy to scale throughout the project and change the exact masking by simply changing one 9Patch masking file.

0
source

Source: https://habr.com/ru/post/1301144/


All Articles