【发布时间】:2020-05-25 04:26:55
【问题描述】:
【问题讨论】:
标签: android android-layout android-fragments android-view android-button
【问题讨论】:
标签: android android-layout android-fragments android-view android-button
实际上我猜你必须使用特殊的库来布局形状(对于图像中的这个形状)但是你可以使用这个代码来查看按钮
<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:layout_centerInParent="true"
/>
shape.xml in drawable folder
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/colorAccent" />
</shape>
【讨论】: