Skip to content
Advertisement

Remove extra space on button and remove rounded corner in Android Studio

I’m trying to make 4 buttons in a grid layout, but I don’t know how to remove the extra space on top and bottom on each button. I also don’t know how to remove the rounded corner. I tried to use cornerRadius but it does nothing.

Here’s the screenshot of the layout.As you can see, there’s a gap in the middle of top and bottom buttons.

enter image description here

Here’s the xml code:

JavaScript

Advertisement

Answer

Try MaterialButton instead of Button

Add following attribute in MaterialButton

JavaScript

Full MaterialButton code:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement