RadioButton自定义、EditText输入状态监听

xml代码:
        
CustomRadioBtn:

radiobutton_background:


    
    
    
    

radiobutton_background_checked:

    
    
    
    

radiobutton_background_unchecked:

    
    
    
    

EditText输入状态监听

editText.addTextChangedListener(new TextWatcher() {
            @Override
            public void beforeTextChanged(CharSequence s, int start, int count, int after) {

            }

            @Override
            public void onTextChanged(CharSequence s, int start, int before, int count) {
                if (TextUtils.isEmpty(editText.getText())){
                    //如果为空
                    nextButton.setEnabled(false);
                }else {
                    nextButton.setEnabled(true);
                }
            }

            @Override
            public void afterTextChanged(Editable s) {

            }
        });

你可能感兴趣的:(RadioButton自定义、EditText输入状态监听)