Android use vector drawable to replace text in button -
currently have button looks this:
what want able replace text vector drawable keep blue rectangle background:
i looked doing cannot seem right.
i tried following combination:
<button android:id="@+id/deletebutton" android:layout_width="0dp" android:layout_height="50dp" android:src="@drawable/deletebtn24dp" android:backgroundtint="@color/primarybuttoncolor" android:layout_weight="1"/>
however led blank blue button no drawable. can drawable replaces text?
also support api levels start @ 16+.
you have use app:srccompat="@drawable/deletebtn24dp"
instead of android:src="@drawable/deletebtn24dp"
. using imagebutton
might better using straight button
.
Comments
Post a Comment