Android - Using Custom Font

后端 未结 21 1692
别跟我提以往
别跟我提以往 2020-11-22 04:38

I applied a custom font to a TextView, but it doesn\'t seems to change the typeface.

Here is my code:

    Typeface myTypeface = Typeface         


        
21条回答
  •  臣服心动
    2020-11-22 05:11

    If you want to load the font from the network or easily style it, you can use:

    https://github.com/shellum/fontView

    Example:

    
    
    
    //Java:
    fontView.setupFont("http://blah.com/myfont.ttf", true, character, FontView.ImageType.CIRCLE);
    fontView.addForegroundColor(Color.RED);
    fontView.addBackgroundColor(Color.WHITE);
    

提交回复
热议问题