0

i use this code to change fonts of textview on my app

Typeface tf = Typeface.createFromAsset(getAssets(),"fonts/Roboto-Bold.ttf");  
    tvDesc.setTypeface(tf);

but the problem is, this only works on nexus devices, when i install my app on a samsung, it uses it's own font.

Thanks

David
  • 3
  • 5
  • Possibly duplicate of http://stackoverflow.com/questions/3651086/android-using-custom-font Where did you put your `fonts` folder ? Under `res` folder or under `assets` folder ? – enadun Nov 17 '14 at 20:11
  • 1
    you are creating typeface variable called `tf2` and setting typeface to the textview as `tf` . Is this correct ? – Android2390 Nov 17 '14 at 20:20
  • this is just a mistake on typing the question, actually on my code both are tf My fonts are in assets folder – David Nov 17 '14 at 20:34
  • Did you find any solution? – MrRobot9 Sep 20 '16 at 10:02

0 Answers0