<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="match_parent"
tools:context="com.example.layout.MainActivity" >
<ImageView
android:layout_margin="10dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/round"
android:src="@drawable/ic_launcher" />
<TextView
android:layout_width="25dip"
android:layout_height="25dip"
android:layout_margin="1dip"
android:gravity="center"
android:layout_gravity="right"
android:text="5"
android:textColor="@android:color/white"
android:background="@drawable/circle"/>
</FrameLayout>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- 背景填充颜色值 -->
<solid android:color="#FFA500" />
<!-- radius值越大,越趋于圆形 -->
<corners android:radius="20dip" />
<!-- 圆角图像内部填充四周的大小 ,将会以此挤压内部布置的view -->
<padding
android:bottom="3dip"
android:left="3dip"
android:right="3dip"
android:top="3dip" />
</shape>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape= "oval"
android:useLevel= "false" >
<solid android:color= "#FF0000" />
</shape>