Skip to content
Advertisement

How can I change the font size in Android Studio?

I don’t want to change the font size of Android Studio itself, but rather the font size of the app i’m working on. All the search results I have found talk about the user interface or zooming in.

I’m Working on a tic-tac-toe beginner project and the button text always is so small. Any tips on how to increase it?

Here is its part in the xml file:

    <Button
        android:id="@+id/button_0"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="1"
    />

Click to see the image

Many thanks in advance for anyone who helps

Advertisement

Answer

Add android:textSize property into Button, eg:

<Button
 android:id="@+id/button_0"
 android:layout_width="0dp"
 android:textSize="20sp"
 android:layout_height="match_parent"
 android:layout_weight="1"
 />

https://developer.android.com/reference/android/widget/TextView#attr_android:textSize

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