Reputation: 123
While using an android button, I keep coming back to the same problem... When I try to add a drawable to a button, the button keeps wrongly framing the drawable.
The button code:
<Button
android:id="@+id/cancel_directions_button_v2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableBottom="@drawable/i_close"
app:layout_constraintStart_toEndOf="@id/info_directions_textview"
app:layout_constraintBottom_toBottomOf="parent"
android:backgroundTint="@color/colorPrimary"
android:layout_marginBottom="26sp"
android:visibility="gone"
/>
Upvotes: 0
Views: 42
Reputation: 91
Try using ImageButton instead.
<ImageButton
.
.
.
android:src="@android:drawable/i_close" />
Upvotes: 1