Roboto font for Android 4+?

AlexMomotov picture AlexMomotov · Oct 1, 2013 · Viewed 27.6k times · Source

Do I need to use Roboto font and put it to asset folder if my app will support only Android 4+ devices?

I would greatly appreciate for your help. Alex. P.S. Sorry for my English:)

Answer

Ahmad picture Ahmad · Oct 1, 2013

You can use Roboto natively from Android 4.1+ like this:

android:fontFamily="sans-serif"           // roboto regular
android:fontFamily="sans-serif-light"     // roboto light
android:fontFamily="sans-serif-condensed" // roboto condensed

For any version below that, you have to load the font yourself. Look at this answer I gave a while back for more information.