How can I use the Roboto Black font in text form

I am trying to apply a Roboto Black font in text form via XML, but it seems to not work. When I look at this 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 not find a way. how to apply it to my texture. The only thing I managed to do was get a bold version of roboto. Is there someone out there who has tried something like this and can help me?

+4
source share
1 answer

Why don't you just install it in a ur java file, as simple as adding this code and running it from the ur resource.

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

Remember to add the ttf file to the ur resource.

0
source

All Articles