自定义圆的半径layout

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
   
    xmlns:myattr="myview"//定义的空间名
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity" >
 <!-- xmlns:android="http://schemas.android.com/apk/res/com.baidu.myattrs" -->//主类的全包名
    <com.baidu.myviews.MyView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="true"
        myattr:radius="50"
         />

</RelativeLayout>

原文地址:https://www.cnblogs.com/1995yu/p/5375071.html