How to add additional font in android environment? I need to make a font like LCD with pale background numbers like this:
http://www.androidfreeware.net/img2/gps_speedometer_android_1.png
How to add additional font in android environment? I need to make a font like LCD with pale background numbers like this:
http://www.androidfreeware.net/img2/gps_speedometer_android_1.png
You want to use the android.graphics.Typeface class, which can create new Typefaces from assets or files.
We at bangalore android developers group had done this for one of our project AutoMeter You can have a look at the code there in detail.
The code would look something like this
Typeface myTypeface = Typeface.createFromAsset(this.getAssets(),"DS-DIGIB.TTF");
waitingTimeView = (TextView) findViewById(R.id.WaitingTime);
waitingTimeView.setTypeface(myTypeface);
DS-DIGIB.TTF is the font put in the assets folder
What if I have a bunch of text views, how can I change them all at once (a for loop or something) or, is it even possible?