I want to create a custom shaped button like this:
I'm able to achieve a similar thing by using a RelativeLayout
and overlapping a rectangle and a circle. But that way, I have to add 2 onClickListaners
, one for each shape.
Is there a way in android ( other than using an image, because in image the entire rectangular view will be clickable and not just the button ) to create such a design using a single XML layout file ??
您不必创建两个侦听器,只需为 RelativeLayout 制作一个侦听器
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.