Instead of px (pixel), use dp (density pixel) for the height and width of the buttons.
Example:
android:layout_height="10dp"
and for text size use only sp (scale index pixel)
android:textSize="6sp"
In the xml above, you forgot to specify the width attribute.
android:layout_width="40dp"
Ram g source
share