android 圆角效果

activity_main.xml代码

  <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
   xmlns:tools="http://schemas.android.com/tools" android:id="@+id/activity_main"
  android:layout_width="match_parent" android:layout_height="match_parent"
  tools:context="com.example.fastjaon.MainActivity"
  android:orientation="vertical">
  <Button
   android:id="@+id/btnloding"
  android:layout_width="200dp"
  android:layout_height="wrap_content"
  android:background="@drawable/shepa"
  android:text="加载数据"/>
  </LinearLayout>

drawable文件夹下新建一个shepa.xml文件 shapepa.xml文件如下
  <shape xmlns:android="http://schemas.android.com/apk/res/android">
  <solid android:color="#ffffff" />
  <corners
  android:topLeftRadius="10dp"
  android:topRightRadius="10dp"
  android:bottomRightRadius="10dp"
  android:bottomLeftRadius="10dp"/>
  <stroke android:width="3dp" android:color="#aeaeae"/>
  </shape>


原文地址:https://www.cnblogs.com/fengzikuange/p/6096623.html