skip to Main Content

How do I increase the Font in textView on Android studio? I can set the font style but I can’t find the attributes to increase the Font Size

2

Answers


  1. You need to add the attribute fontSize inside TextStyle.

    Example:

    Text(
       'Some text',
       style: TextStyle(
          fontSize: 20
       )
    )
    

    Doc: https://api.flutter.dev/flutter/painting/TextStyle-class.html

    Login or Signup to reply.
  2. as you are working in XML try this android:textSize="xsp" replace that ‘x’ with the size you desire ‘sp’ scales the text if you want hardcoded text size try ‘dp’

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search