Q:

Enable Button Clickable after writing certain text in textview android

I am trying to build a Sign in method in which one person has to write its Email Address of the particular domain 
e.g rob@playground.football.in
Now my intention my codes should check the domain i.e playground.football.in then if it matches then only the button which is for signing in(which is disable/unclickable before writing the particular domain) should be enabled now.
I have done half of the work.for getting the domain shown below 
email = (EditText) findViewById(R.id.email); verify = (Button) findViewById(R.id.button); verify.setEnabled(false); String getEmail = email.getText().toString();
String x = getEmail.substring(getEmail.lastIndexOf('@') + 1);
if (x.equals(domain)) {
verify.setEnabled(true); 
}

A:

Add TextChangedListener to your email EditText using email.addTextChangedListener() and put your checking inside onTextChanged().
Here is the working code. Update your code as below:
    ..................
    .........................
    EditText email = (EditText) findViewById(R.id.email);
    Button verify = (Button) findViewById(R.id.button);
    verify.setEnabled(false);

    email.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) {

            String getEmail = email.getText().toString();
            String x = getEmail.substring(getEmail.lastIndexOf('@') + 1);

            if (x.equals(domain)) { 
                verify.setEnabled(true); 
            }
        }

        @Override
        public void afterTextChanged(Editable editable) {

        }

    });
    ..............
    .....................

Hope this will help~

