I have a input field i want it to take input like a password until string length is 8 and after that the input type should change to text, that means if the input field has 12 characters starting 8 characters should be asterisk and other 4 should be text.
The method i am using now changes the type of whole edittext but i don't want that.

```
etEmail.addTextChangedListener(new TextWatcher() {
        @Override
        public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {

        }

        @Override
        public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
            email = etEmail.getText().toString();

        }

        @Override
        public void afterTextChanged(Editable editable) {
            email = etEmail.getText().toString();
            if(email.length() > 8){
                etEmail.setTransformationMethod(null);
                etEmail.setSelection(etEmail.length());

            }

        }
    });

```

If this is the string: 123456789012
The input field should show it like that: \*\*\*\*\*\*\*\*9012