I want to draw a perfect circular button. I tried using the following code:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval" >
<stroke
android:width="3dip"
android:color="#065a32" />
<corners android:radius="10dip"/>
<solid android:color="#eaebec" />
</shape>
But I could only draw an oval shape, even if I change the parameter:
<stroke
android:width="3dip"/>
<corners android:radius="10dip"/>
My screenshot:

I have already tried different links on this site, but none of them satisfy my need.
Edit:
My code for getView ():
public View getView(int position, View convertView, ViewGroup parent) {
View v = convertView;
if (convertView == null) {
LayoutInflater vi = (LayoutInflater) mContext
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
v = vi.inflate(R.layout.calendar_item, null);
}
view.setBackgroundResource(R.drawable.calendar_cell_clicked);
}
source
share