Is there a way to implement rounded corners to a Mapfragment?

后端 未结 7 700
忘了有多久
忘了有多久 2020-11-30 09:10

I want to give the map a nice looking rounded corners as the two boxes below it have. I can\'t do it with the map fragment it self because there is not a background property

7条回答
  •  情深已故
    2020-11-30 09:43

    If you are only trying to target API 21 (Lollipop) and higher


    This is the easiest way possible.

    parentView.setClipToOutline(true);

    Result

提交回复
热议问题