How to use specified weights for fonts in XML

后端 未结 9 2008
小蘑菇
小蘑菇 2021-01-30 02:58

Using the Fonts in XML feature you can specify various font weights for a font family. For example:



        
9条回答
  •  逝去的感伤
    2021-01-30 03:47

    here how you can user different font's weights in android studio

    1. Open app/src/main/res/layout/you_awesome_layout.xml
    2. Select the Design tab
    3. In the Component Tree panel, open you TextView and select View all attributes at the bottom of the right menu
    4. In the Attributes panel, open the fontFamily dropdown and select More Fonts…
    5. Select family YouFontFamilyName
    6. Select style Regular/Bold/Semibold/Black/WhateverStyleYouHaveThere

    Voila, I think this is the only way to achieve what you want

提交回复
热议问题