private void onPasswordFocusChanged(boolean hasFocus){
  if (hasFocus) {
    showViewPasswordButton();
  }
 else {
    hidePassword();
    hidePasswordButton();
  }
}

private void onPasswordFocusChanged ( boolean hasFocus ) { if ( hasFocus ) { showViewPasswordButton ( ) ; } else { hidePassword ( ) ; hidePasswordButton ( ) ; } }
handles changes in focus on the text input for the password ( basic authorization ) . when ( hasfocus ) , the button to toggle password visibility is shown . when ( ! hasfocus ) , the button is made invisible and the password is hidden .
