Android : Typeface is changed when i apply password Type on EditText

前端 未结 6 1079
借酒劲吻你
借酒劲吻你 2021-02-01 12:53

I use FloatLabel library (https://github.com/weddingparty/AndroidFloatLabel) to add a little animation when user begin to write something in an EditText Android

6条回答
  •  滥情空心
    2021-02-01 13:33

    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
    

提交回复
热议问题