How to use the TextWatcher class in Android?

前端 未结 9 1126
独厮守ぢ
独厮守ぢ 2020-11-22 02:30

Can anyone tell me how to mask the substring in EditText or how to change EditText substring input to password type

9条回答
  •  独厮守ぢ
    2020-11-22 03:06

    For use of the TextWatcher...

    et1.addTextChangedListener(new TextWatcher() {
        @Override
        public void onTextChanged(CharSequence s, int start, int before, int count) {
    
            // TODO Auto-generated method stub
        }
    
        @Override
        public void beforeTextChanged(CharSequence s, int start, int count, int after) {
    
            // TODO Auto-generated method stub
        }
    
        @Override
        public void afterTextChanged(Editable s) {
    
            // TODO Auto-generated method stub
        }
    });
    

提交回复
热议问题