Create a folder named font under the Resources folder.Get your font file ready or download one from Google Fonts for example the Modak.Emmbbed the font in the application bundle It is not a big issue though as doing it manually is pretty straightforward. Android Studio comes with a wizard to do this, but unfortunately we do not have this luxury in Visual Studio. The natural way to use a custom font is to include it inside the application bundle. It was surprisingly not easy to find some proper steps to achieve this in Xamarin hence the writing of this blog post. This feature is also supported on devices till Android 4.1 by using Support Library 26 or more. To circumvent this problem, I had been using the Calligraphy library for the past couple of years, as well as embedding those fonts inside the application.Īt last, Android 8 (API level 26) introduced a native solution to this problem. Instead of being able to set fonts by XML, it was necessary to write code to set the desired font in a widget. Using custom fonts in Android applications have always been a bit of a pain.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |