Changing Font in the Application

Save

We are often interested in the personalisation. When it comes to our desktop theme we reflect our taste. Same thing happens in case of application theming. We change style, fonts, colors, animation and like that. Changing font is also as important as other theming elements.

I was recently tasked with adding the ability to change font size when user changes the store.

Today we are gonna change the default theme of the application.

1. Custom Font Files

We can download free fonts available
banner(2)
e.g. https://www.google.com/get/noto/#kufi-arab 

2. Adding Font Files Applications

Remove the files from the .zip folder   assets /fonts under-copy.

For grade build the path will look like:

Screenshot_1

 

If you mistakenly choose different path, you will issues like

 

 3. Using the application elements on the Font File

First of all extends the Application and override the on Create Methods.

Hot Served Code for FontsOverride class:

 

Another way to achieve it is by using Custom Class.

Create a custom class

Now you can access this custom UI wherever we want. We can access it directly in XML or programmatically.

 

 

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


1 comments

  • Aman Gupta
    great Tut…..Shubham….easily understandable……
  • css.php

    All communication is done through a ticket system. I appreciate the regular almost daily updates of what is being worked on, and communicating changes or updates is easy through this system. Mobikul's response timeframe is quick.

    Josh Arnold

    Josh Arnold

    Owner, Shop ATV Escape

    Talk to Sales

    Global

    Live Chat
    Start a Project


      Message Sent!

      If you have more details or questions, you can reply to the received confirmation email.

      Back to Home