Can anyone tell me how I can create a custom rounded button in Android (like the one you see in the middle of the picture)?
Asked
Active
Viewed 234 times
1
-
1You can just set the circular background image for Button. – Siddharth_Vyas Mar 24 '14 at 12:11
-
Refer this link: http://stackoverflow.com/questions/9334618/rounded-button-android – Lokesh Mar 24 '14 at 12:16
-
in this image which is button – Shakeeb Ayaz Mar 24 '14 at 12:19
-
All three are buttons, but I don't know how to make the rounded one in the middle. – user735646 Mar 24 '14 at 12:23
2 Answers
1
Every View on Android is a rectangle. Considering your picture, let's take a look at the Views (the lines represent View bounds):
The trick is that the big round Button in the middle simply overlaps the other two in some particular Layout. I've quickly tested this assumption and was able to achieve pretty much the same result, here's a screenshot illustrating how this can be done quite easily:
Droidman
- 10,983
- 15
- 91
- 137
-
@poitroae sorry, but this is a 2-yers old answer and I don't have any related code. And as far as I remember *I didn't have* any code, as you can see on the screenshot this is just a simple visual editor mock up – Droidman Apr 05 '16 at 10:33
0
you can use this online button generator which also makes rounded buttons http://angrytools.com/android/button/
JRE.exe
- 781
- 1
- 14
- 27