Set Custom Fonts for TextView and EditText in Android

Custom Fonts

Anu S Pillai

The Admin at GadgetSaint.com

You may also like...

11 Responses

  1. Gigibit says:

    Error:(64) No resource identifier found for attribute ‘customFont’ in package ‘com.archimedia.moveng’

  2. Gigibit says:

    Sorry, just delete previous comment.

    What does ‘foo:’ mean?

  3. Anu S Pillai says:

    That is just a namespace. You may write your own.

  4. Anu S Pillai says:

    Check the linearlayout code.. foo is defined there

  5. Gigibit says:

    Thanks a lot!

    Anyway there is an error in here:

    typeface = Typeface.createFromAsset(ctx.getAssets(), asset);

    In your example you said:
    “Once the Assets folder is created, create a subfolder inside assets folder called fonts.”

    So that line should be:

    typeface = Typeface.createFromAsset(ctx.getAssets(), “fonts/”+asset);

    Doesn’t matter, thanks a lot!

  6. Anu S Pillai says:

    Thanks for pointing out, I will make the change! 🙂

  7. DOA says:

    worked like a charm, great guide.

  8. Gungde says:

    Is it work to Edittext if we do like the same?

  9. Anu S Pillai says:

    Yes it will work

  10. test says:

    not working this code

Leave a Reply

Your email address will not be published.