I use FloatLabel library (https://github.com/weddingparty/AndroidFloatLabel) to add a little animation when user begin to write something in an EditText Android
Set the inputType as "text" in the xml,
Then make the EditText in the activity as
mEdtConfirmPassword = findViewById(R.id.edtPassword); mEdtConfirmPassword.setTransformationMethod(new PasswordTransformationMethod());