<Button
android:layout_width="168dp"
android:layout_height="40dp"
android:layout_marginStart="140dp"
android:layout_marginTop="80dp"
android:gravity="center"
android:background="@drawable/button_borders"
android:fontFamily="@font/fontpragatinarrow_bold"
android:includeFontPadding="false"
android:text="@string/check"
android:textSize="21sp" />
Edit : If layout_height is switched to wrap_content:
CodePudding user response:
Just use "wrap_content" for width and height
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="button"/>
CodePudding user response:
<Button
android:layout_width="168dp"
android:layout_height="40dp"
android:layout_marginStart="140dp"
android:layout_marginTop="80dp"
android:gravity="center_horizontal|center_vertical"
android:background="@drawable/button_borders"
android:fontFamily="@font/fontpragatinarrow_bold"
android:includeFontPadding="false"
android:text="@string/check"
android:textSize="18sp" />
android:gravity="center_horizontal|center_vertical"