Hi i am writing an android app. And I want the roboto font in it irrespective of the version of the phone. Is there a way to do it?
Thanks, Rahim.
Yeah why not, you can get the Roboto font :
Android ICS typography
Lets say you want to change the font of a text view :
Typeface tf = Typeface.createFromAsset(getAssets(),
"fonts/Roboto-Black.ttf");
TextView tv = (TextView) findViewById(R.id.FontTextView);
tv.setTypeface(tf);
Try this link http://www.barebonescoder.com/2010/05/android-development-using-custom-fonts/
Set the typeface property of the control you are targeting to serif... and for the font file I recommend using TTF, it has worked for me in the past
Also try these links
http://techdroid.kbeanie.com/2011/04/using-custom-fonts-on-android.html
Android - Using Custom Font
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With