Draw a semicircle in the background of a View

后端 未结 4 1431
别跟我提以往
别跟我提以往 2020-12-01 03:24

I am trying to create a TextView whose background is a half circle. I create a oval using a ShapeDrawable. I tried to create a semicircle by using ScaleDrawable to double th

4条回答
  •  感情败类
    2020-12-01 03:51

    instead you can use the image to set as a background...

    1>design any image using paint and save it to any supported format such as .jpg or .png i.e this will be your image with semicircle which you want.

    2>save the image in the res/drawable folder

    3>set your textview background to that image using android:background="@drawable/yourimage.jpg"

    hope this helps...

提交回复
热议问题