1
I would like to know how to change the font to casual in my textView through java code.
TextView text1 = findViewById(R.id.myTextView);
I want to change the font from text1 to casual (android:fontFamily="casual"
), but I don’t know how to do it through java code. How to do this?
Perfect friend I’ll give a try now....
– André alas
It worked perfectly - Obs! I was wrong in typing the question.... I wrote it down
android:famalyFont="casual"
but the right thing isandroid:fontFamily="casual"
.... But since we’re on the subject then correct me if I’m wrong, but this property is for API16+ I’m right?– André alas
Both the
Typeface.create()
, how muchtextview.setTypeface()
, are provided by API 1. according to Typeface and Textview– Murillo Comino