If you want something like this
Button preview
here is the code.
1.Create a xml file in your drawable folder like mybutton.xml and paste the following markup:
-
-
-
2.Now use this drawable for the background of your view. If the view is button then something like this: