A typeface which is set using setTypeface(Typeface) is overwritten when tapping the icon. This is caused by the call to setInputType() in togglePasswordVisibility(). Instead of calling setInputType() it would be better to use setTransformationMethod() like this:
private void togglePasswordVisibility() {
// Store the selection
int selectionStart = this.getSelectionStart();
int selectionEnd = this.getSelectionEnd();
// Set transformation method to show/hide password
if (isShowingPassword) {
setTransformationMethod(new PasswordTransformationMethod());
} else {
setTransformationMethod(null);
}
// Restore selection
this.setSelection(selectionStart, selectionEnd);
// Toggle flag and show indicator
isShowingPassword = !isShowingPassword;
showPasswordVisibilityIndicator(true);
}