I use FloatLabel library (https://github.com/weddingparty/AndroidFloatLabel) to add a little animation when user begin to write something in an EditText Android
Another solution is just to save the typeface before you change the inputType and reapply it after. Strangely this doesn't happen when set the inputType in xml but happens when setting programatically.
val typeface = editText.typeface
editText.inputType = inputType
editText.typeface = typeface