I use FloatLabel library (https://github.com/weddingparty/AndroidFloatLabel) to add a little animation when user begin to write something in an EditText Android
For some reason I didn't have to set the transformation method so this may be a better solution. In MyActivity:
EditText editText_password = findViewById(R.id.edittext); editText_password.setTransformationMethod(new PasswordTransformationMethod());