I want to create a circular button in android. This is the xml I am using:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="#9F2200"/>
<stroke android:width="2dp" android:color="#fff" />
</shape>
Now, when I put the button in the layout, I have to set the above xml as
android:background
attribute. But then how can I put the image in the round button that I created. How to execute this inside xml itself?
source
share