1

with android studio I have a textview that is the text of my countdown timer. I want to have that text view with digital characters. Can you help me?

Rick
  • 3,943
  • 6
  • 33
  • 45

3 Answers3

5

You have to change the font of the text of text view.

First put the font in your asset folder.

Then in your java file add code like this to change your font:

Typeface myTypeface = Typeface.createFromAsset(this.getAssets(),
                    "Digital.ttf");
TextView digital= (TextView) findViewById(R.id.your_textView);
            digital.setTypeface(myTypeface);

Put Digital.ttf in your asset folder of your project.

This will might help you.

Avijit
  • 3,834
  • 4
  • 33
  • 45
0

yes you can do this ... place the ttf file in the assets folder and do the following code

 /**Font Typeface***/
        String fontPath = "fonts/DS-Digital.ttf";

    /**Font Typeface***/
    tf  = Typeface.createFromAsset(getAssets(), fontPath);

and then finally set it to textview

TextView wordtext;
wordtext.setTypeface(tf);
Jeffy Lazar
  • 1,903
  • 13
  • 20
0

Download the fonts from below link

http://www.fontpalace.com/font-download/LED.Font/ http://www.fontspace.com/download/13974/c46cca08c1d746a1836e0080c24de5c2/wlm-fonts_lets-go-digital.zip

and crate a Assets folder paste it in ASstest folder of your app Now in Activity

Typeface tf = Typeface.createFromAsset(getAssets(),
            "fonts/Digital.otf");
TextView tv = (TextView) findViewById(R.id.Text);
tv.setTypeface(tf)      
Kapil Parmar
  • 881
  • 8
  • 19