I have a grid layout which is filled with buttons, now i want the buttons to be more distant from each other, what code should i write? i tried to search it but only found a solution for GridView, not GridLayout.
You can put margin to the buttons
Instead of adding margin to each buttons, use android:useDefaultMargins="true"
It is better than adding margin to each buttons!
来源:https://stackoverflow.com/questions/35270404/android-gridlayout-spacing-between-items