![]() ![]() There is a bit of code necessary, which we'll show in the next section. ![]() However, we prefer to continue to use the standard android:textStyle instead of a special customfont:textStyle or similar. The last textStyle works on normal TextViews, but not if you apply a custom font. The first five XML properties are standard and work without any customization. If you worked with Android before, nothing of the following code snippet should surprise you: In this blog post, we changed the package name from a code snippet of our eat foody project to an open source class in our tutorial repository. You've seen in the previous blog post how to setup a custom view for use in the XML layout files. Next, we'll look how to integrate the textStyle property. The base for applying text styles to our custom font is done. Continuing our example from last week with Source Sans Pro, your assets folder now should look like this: The first thing to do is adding the font files (preferably as. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |