![](/img/trans.png)
[英]How to create a rounded layout containing Imageview and a textview?
[英]How to create a rounded layout
其實我猜你必須使用特殊的庫來布局形狀(對於圖像中的這個形狀)但是你可以使用這個代碼來查看按鈕
<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>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.