I don't want to use android default font in my android app. I would like to use "Segoe UI Light" font in my android app. how should i write style and theme code for custom font. OR what should i do, if i want to use custom font in android app. Please . . . .
Asked
Active
Viewed 1,380 times
1 Answers
3
Place whichever font you want in fonts folder in,
res/assets/fonts
Then in in your code,
Typeface myTypeface = Typeface.createFromAsset(getAssets(), "fonts/myFont.ttf");
TextView myTextView = (TextView)findViewById(R.id.textview1);
myTextView.setTypeface(myTypeface);

Akanksha Hegde
- 1,738
- 11
- 14