S Zain Bukhari S Zain Bukhari - 5 months ago 37
Android Question

How to import external font/ typeface in ANDROID STUDIO?

I wanna know how do I use an external font in Android Studio as there is no Assets folder. I have look for a helpful turtorial on internet but they all pretend to use Assets folder. I created an asset folder myself in src/main but Android Studio doesnt recognie getAssets(). So help me maybe :)

Thank You


Go on your Project: app-->src-->main

Create a assets folder like this:







and then use

     Typeface face=Typeface.createFromAsset(getAssets(),"fonts/digital.ttf");