remove additional underline in EditText

前端 未结 5 1101
广开言路
广开言路 2020-12-07 02:40

I have EditText with custom background drawable:

EditText code:



        
5条回答
  •  情书的邮戳
    2020-12-07 03:27

    I have seen all the valid answers given above. But at the last try You can something like:

     mEditText.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) {
    
                }
    
                @Override
                public void afterTextChanged(Editable editable) {
                    new Handler().postDelayed(new Runnable() {
                        @Override
                        public void run() {
                            mEditText.clearComposingText();
                        }
                    },200);
    
    
                }
            });
    

    ClearComposingText method will help you. Hope this helps.

提交回复
热议问题