Issue
How do I remove those space between Button
border and view bounds tried setting padding
to 0dp
but with no results.
These is material button with default style.
Solution
The MaterialButton
has a default style with these insets:
<style name="Widget.MaterialComponents.Button"..>
<item name="android:insetLeft">0dp</item>
<item name="android:insetRight">0dp</item>
<item name="android:insetTop">@dimen/mtrl_btn_inset</item>
<item name="android:insetBottom">@dimen/mtrl_btn_inset</item>
...
</style>
The value of @dimen/mtrl_btn_inset
is 6dp
.
Just use:
<com.google.android.material.button.MaterialButton
android:insetTop="0dp"
android:insetBottom="0dp"
../>
Answered By - Gabriele Mariotti
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.