I want to make a button exactly like in this image
I want to use a xml file that will us
finally I found the way to do it with xml file. here is the code of the xml file that gave me the capsule shape button.