UI ---- Android developers artistic font settings

Android in the development process, in addition to setting the picture, and the rest need to manually set, that is, the text, as in TextView, we enter the text or display text, almost always use the default font, no novelty, but want to use the word the WordArt, knowing where to start, then Benpian will take you to play about WordArt in Android

Usually we use when Android art, a method is to download the font library, we look like the font type, and then download the font library ported to our project, you can format the text.
We can find a lot of online font type, as shown below, assuming we like the font type, then we can choose to download fonts, get a **. Ttf ** format font library.
Here Insert Picture Description
Placed under the Asset directory.
Here Insert Picture Description
Then you can set TextView text format in the Activity page.

 tv_splash = findViewById(R.id.tv_splash);
        //得到字体库类型
        Typeface typeface = Typeface.createFromAsset(getAssets(),
                "包图小白体.ttf");
        tv_splash.setTypeface(typeface);

Look effect
Here Insert Picture Description

There is another, need to rely on third-party font library, if helpful to the case, then this update after the project.

Published 15 original articles · won praise 5 · Views 635

Guess you like

Origin blog.csdn.net/qq_33235287/article/details/104141450