Show Password in EditText

Hi friends, Have a great day. I comeback after long time.

Ok,  now will look up to show password option in edit text.

Now most of login screens comes up with another cool feature, that's show password.

User want to see their password, until they done editing.


You can use it with checkbox option. It's simple, but you can make it by your way.

@Override
    public void onCheckedChanged(CompoundButton compoundButton, boolean isChecked) {
        if(!isChecked){
            edit_password.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
        }else{
            edit_password.setTransformationMethod(PasswordTransformationMethod.getInstance());
        }
    }

Comments

Popular posts from this blog

Flutter Bloc - Clean Architecture

Dependencies vs Dev Dependencies in Flutter

What's new in android 14?