实际上我想您必须为布局形状(对于图像中的该形状)使用特殊的库,但是您可以将此代码用于按钮视图
<ImageButton
android:background="@drawable/shape"
android:src="@drawable/ic_check_black_24dp" // drawable right click -> new -> vector asset
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
android:layout_centerInParent="true"
/>
shape.xml in drawable file
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/colorAccent" />
</shape>