A Tiny Font Utility Library for Xamarin.Android to apply custom Fonts to Toolbar NavigationView Menu Submenu Other Views like EditTex...

Font Utils Library for Xamarin.Android Font Utils Library for Xamarin.Android

Font Utils Library for Xamarin.Android

Font Utils Library for Xamarin.Android

A Tiny Font Utility Library for Xamarin.Android to apply custom Fonts to

  • Toolbar
  • NavigationView
  • Menu
  • Submenu
  • Other Views like EditText, TextView, etc.

Supported Android Languages

  • Java
  • Kotlin
  • Xamarin

Readme for Java and Kotlin can be found here https://github.com/androidmads/FontUtils.

How to download

You can download the plugin from Nuget Package Manager using

Install-Package XAFontUtils -Version 1.0.1

How to use

The following code are used to implement the library in Xamarin.Android
// To import the Library
using XAFontUtilsLibrary;
...
// Applying Custom Font
Typeface typeface = Typeface.CreateFromAsset(Assets, "custom_font.ttf");
// Init Library
FontUtils fontUtils = new FontUtils();
// Apply font to Toolbar
fontUtils.ApplyFontToToolbar(toolbar, typeface);
// Apply font to NavigationView
fontUtils.ApplyFontToNavigationView(navigationView, typeface);
// Apply font to Menu
fontUtils.ApplyFontToMenu(menu, typeface);
// Apply font to Other Views like TextView...
fontUtils.ApplyFontToView(textview, typeface);
fontUtils.ApplyFontToView(editText, typeface);
fontUtils.ApplyFontToView(radioButton, typeface);
fontUtils.ApplyFontToView(checkBox, typeface);

Github Link

You can download the code from GitHub and it is open sourced.

License

It is Licensed under MIT License. You can find that here.

1 comment:

  1. Great post!
    Thanks for sharing this list!
    It helps me a lot finding a relevant blog in my niche!
    xamarin training in chennai
    xamarin course in chennai

    ReplyDelete