Code example for AlertDialog

Methods: getButton

0
    } 
 
    // implements TextWatcher 
    @Override 
    public void afterTextChanged(Editable s) {
            mDialog.getButton(AlertDialog.BUTTON_POSITIVE).setEnabled(s.length() > 0);
    } 
 
    // implements TextWatcher 
    @Override 
    public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
 
    // implements TextWatcher 
    @Override 
    public void onTextChanged(CharSequence s, int start, int before, int count) {}
 
    // Saves contents during orientation change 
    @Override 
    public void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
        outState.putString(