How to implement hindi font in android application

0
19203

In this tutorial we will learn to implement marathi/hindi font in an android application which consists an text view, to display the text.

  • To implement marathi/hindi font in android application follow the steps given below :

  1. First of all open up Android eclipse :

  2. Go to File->New->Android Application Project

  3. You will get a dialog box where you have to provide the details for your applicaiton :

  4. After filling the details you will have the following view of your Dialog box :

  5. Now click on Next button, you will get another dialog box where you just have to uncheck the first icon :

  6. After this click on the Next button, it will ask to select a Activity. So, select Blank Activity and click on Next button :

  7. Your Blank Activity will get created, so now click on the Finish button :

  8. Your project will be created as shown below :

  9. Now download the font which ever you like for example marathi font “mangla” and paste it in the assets folder as shown in the image below :

  10. Now let’s design our layout. So, go to activity_main.xml file and drag and drop the TextView as shown in the image :

  11. Now save your work by pressing Ctrl + S .
  12. Now go to MainActivity.java file and write the following code in it :
  13. Now go to Your activity_main.xml file and insert your Marathi / Hindi text in the text property of the TextView as shown in the image.

  14. Now select your project and run it as shown :

  15. Thus you will have following Output on your emulator…

  16. For inserting the image you can copy and paste the image in res->drawable folder

Thus, we have successfully learnt how to implement hindi font in android application.

LEAVE A REPLY

Please enter your comment!
Please enter your name here