Android use vector drawable to replace text in button -


currently have button looks this:

enter image description here

what want able replace text vector drawable keep blue rectangle background:

enter image description here

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

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -