Android text style missing light, medium, thin,

48,832

This is font specific. Not all fonts have a light, medium, thin attribute/style, but the default font should. You can use the default light font by using fontFamily: sans-serif-light or for thin, fontFamily: sans-serif-thin.

For custom fonts, you would need to include the light version of the font and use it.

Share:
48,832
AlikElzin-kilaka
Author by

AlikElzin-kilaka

Love my family, life, animals and code. Love to save time, love to spend time and spending too much time deciding on what love should I spend time.

Updated on May 22, 2020

Comments

  • AlikElzin-kilaka
    AlikElzin-kilaka about 4 years

    When setting custom fonts for a textview, I can only choose normal, bold or italic: enter image description here

    How can I set the style to be light instead of bold in the following example?

    <TextViewWithCustomFont
    ...
    android:textStyle="bold"/>