Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android develop LCD font

Tags:

android

fonts

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

like image 643
user345602 Avatar asked May 21 '10 00:05

user345602


1 Answers

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

like image 175
the100rabh Avatar answered Oct 14 '22 17:10

the100rabh