0

I'm trying set custom font on TextView:

public void setHeaderTextWithKaushan (String text) {
    headerText.setText(text);
    Typeface face = Typeface.createFromAsset(getResources().getAssets(), "font/kaushan.otf");
    headerText.setTypeface(face);
}

But I get an error:

java.lang.RuntimeException: Font asset not found font/kaushan.otf

I've read similar questions and some guys say to move fonts folder from resto assets, but I've opened project structure(*picture) an there is no assets folder.

Project structure

Which is the problem?

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199

0 Answers0