AppWidget image with rounded corners

前端 未结 2 1537
遥遥无期
遥遥无期 2021-01-26 18:02

So, I am dynamically creating an image within my app by animating various Views that I display to the user in the main layout of my application.

Currently I am generati

2条回答
  •  渐次进展
    2021-01-26 18:53

    In addition to this issue:

    'It turns out that the size of my AppWidget was clipping the image the whole time. Clipping it just enough to remove the rounded corners, and just so little as to not have been obviously clipped. So for anyone that comes across this question... all of these method's work for this purpose (just don't forget to make your AppWidget big enough to see the results).'

    Answer:

    I found it was critical to also pass the RoundedCornersDrawable through the CustomView.drawToBitMap() method before exporting it to the PNG file.

    I hope this all helps someone down the road someday!

提交回复
热议问题