简体   繁体   中英

How to cut out a triangle in a circle button using Kotlin in android studio?

I'm going to design a layout which includes a circle button. There is a triangle in centre of the circle. The background of the circle should be transparent but the background of triangle should be the main background (in fact I wanna cut out a triangle from a circle button). Do you have any idea how to implement that using Kotlin?

image is attached: button image

Keep in mind thay Android Studio doesn't have an image editor inside it. The easiest way to achieve it is getting the icon vector and importing it to android studio.

When It comes to design, there are some tools that helps devs. Take a look at this material icon database and search for "play": https://materialdesignicons.com/ Download the SVG and import it to android studio.

An alternative is, inside android studio, right-click at res>drawable folder. Import Vector Asset. Android studio has some ready-to-use icons. You'll may find some there too.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM