在drawable文件中写
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <corners android:radius="5dp"/> <solid android:color="@color/blue"></solid> <padding android:top="2dp" android:bottom="2dp"/></shape>