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

前端 未结 6 1183
借酒劲吻你
借酒劲吻你 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:27

    The following might solve it for you.

    pass.setTypeface(user.getTypeface());
    

    Essentially it just passes the Typeface of your username field and passes it as the Typeface for your password field.


    I found an explanation of this in the Dialogs API Guide.

    Tip: By default, when you set an EditText element to use the "textPassword" input type, the font family is set to monospace, so you should change its font family to "sans-serif" so that both text fields use a matching font style.

    In otherwords, a fix that can be done in XML would be as follows:

    
    

提交回复
热议问题