4

I am trying to apply the Roboto Black font on a textview via XML, but it seems like it's not working. When i look at that site http://developer.android.com/design/style/typography.html it looks like it should be possible, to access the Roboto Black font, but in fact i can't find a way how to apply it to my textview. The only thing i managed to do is to get the bold version of the roboto regular. Is there someone out there, who tried something similar and can help me out?

1 Answers1

0

Why don't you just set it in ur java file, it's just as simple as adding this code and run it from ur asset.

 Button mail = (Button) findViewById(R.urid);  
      Typeface font = Typeface.createFromAsset(getAssets(), "fonts/RobotoCondensed-Italic.ttf");  
      mail.setTypeface(font);

Remember to add ttf file into ur asset.

Confuser
  • 53
  • 1
  • 9