try this: create layout.xml
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/main_widget" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:layout_marginTop="20dip" android:focusable="true" > <ImageView android:id="@+id/icon" android:layout_width="60dip" android:layout_height="60dip" android:layout_marginTop="8dp" android:background="@drawable/logo" android:contentDescription="image" android:scaleType="center" /> <TextView android:id="@+id/txt_count" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="-10dip" android:layout_toRightOf="@+id/icon" android:background="@drawable/badge_count2" android:contentDescription="badge" android:gravity="center" android:text="1" android:textColor="@color/White" android:textStyle="bold" android:visibility="visible" /> </RelativeLayout>
And create drawable\badge_count2.xml for the rectangle
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <solid android:color="@color/red" > </solid> <stroke android:width="2dp" android:color="#FFFFFF" > </stroke> <padding android:bottom="2dp" android:left="7dp" android:right="7dp" android:top="3dp" /> <corners android:radius="10dp" > </corners>
And create the values\color.xml and add:
<color name="red">#e50822</color>
OutPut: 
Update: try to create drawable\badge_count2.xml for the circle
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:innerRadius="0dp" android:shape="ring" android:thicknessRatio="1.9" android:useLevel="false" > <solid android:color="@color/red" /> <stroke android:width="2dp" android:color="#FFFFFF" /> </shape>
source share