Issue
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"
/>
Solution
Try using ImageButton instead.
<ImageButton
.
.
.
android:src="@android:drawable/i_close" />
Answered By - M D
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.