-4

This is my code, it's very strange, I'm using var for the declaration

lateinit var ln_onvan: TextInputLayout
lateinit var typeface: Typeface

typeface = Func.getTypeface(this)
ln_onvan=findViewById<TextInputLayout>(R.id.ln_onvan)

///on this line I get this error
ln_onvan.typeface=typeface;

I don't understand it, could you help me to solve this problem?

Navid Abutorab
  • 1,667
  • 7
  • 31
  • 58

1 Answers1

1

ln_onvan.typeface does not refer to your local variable typeface. You should refer to this existing question to change typeface of your TextInputLayout : Change font of the floating label EditText and TextInputLayout

Rémi P
  • 421
  • 5
  • 11