I have a GridLayout with a columnCount of 6, in which I want to place several Button(s). However, the Buttons are not being resized correctly. Here is the code for the Button(s) (the only difference between the Button(s) is the layout_column and text properties):
<Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_column="0" android:layout_row="0"
android:background="@drawable/tabborder" android:textColor="@color/Black" android:textSize="16dp" android:fontFamily="@font/arialfamily"
android:layout_marginLeft="3dp" android:layout_marginRight="3dp" android:layout_marginTop="3dp" android:layout_marginBottom="0dp"
android:paddingLeft="0dp" android:paddingRight="0dp" android:paddingTop="0dp" android:paddingBottom="0dp"
android:textStyle="bold" android:textAllCaps="false" android:stateListAnimator="@null" android:includeFontPadding="false" tools:text="Names"/>
And the tabborder (used for the background property) is the following:
<?xml version="1.0" encoding="utf-8" ?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="@color/Gray"/>
<corners android:bottomLeftRadius="0dp" android:bottomRightRadius="0dp" android:topLeftRadius="6dp" android:topRightRadius="6dp"/>
</shape>
And here are the screenshots:


It seems like the Button(s) have a minimum size (although you can see in the code that they do not). Also notice that the Button(s) are cropped on the right, although the width of the other stuff is appropriately resized. Why are the Button(s) not being appropriately resized?


