How to use drawableLeft with an xml icon? I have the following button:
<Button
android:id="@+id/vitimas"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:drawableLeft="@drawable/ic_person_black_24dp"
android:drawableStart="@drawable/ic_person_black_24dp"
android:background="@drawable/botao_verde"
android:text="Vítimas"/>
In old APIs such as 16, the app stops working due to drawableLeft
, I tried to use an ImageButton
but the same happens, if I use app: srcCompat
it works, however the icon is not stay in left, I need it to be stay in left and the text in the middle
The icon is from the Vector Asset package.