Android round shape :
In designing android layout screens sometimes we want buttons to be android round shape at corners and also we can make it completely circle i.e., O in shape.
Not only buttons but we can also have rounded layouts, edittext and different other components with the help of this android round shape file.
In this tutorial we will be going through the procedure of preparing this file so that we can use this file through out our app so that we can attain rounded shapes to our components.
So let’s start it by
Making our shape as rectangle
Next step is setting up some padding this you can adjust according to you wish.
Then here comes our color.
At last set you radius at every corner for rounded corner button make sure all the sides are same.Also you can specify the single line as radius which considers the value to all sides.
Creating round.xml :
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" android:padding="10dp"> <solid android:color="#000000"/> <corners android:radius="10dp"/> </shape>
Save it as a xml file in drawable folder and set this as background to your button.
So as your are setting this as background to your component i recommend you to add the required color to the view so that it will be added within.
Also you can customize the above file with your own requirements and can try and let me know if you find any difficulty.
Setting up with you button :
If you have any queries on android round shape do let us know in comment section below.