Code example for EditText

Methods: setErrorsetText

0
     *          1: Captcha field left blank. 
     *          2: Captcha incorrect. 
     * 
     */ 
    private void captchaError(int errorType) {
        mCaptchaEditText.setText("");
        switch (errorType) {
        case 1: 
            mCaptchaEditText.setError("This field cannot be left blank.");
            break; 
        case 2: 
            mCaptchaEditText.setError("This answer is incorrect.");
            break; 
        default: 
            mCaptchaEditText.setError("This is not a valid solution.");
        } 
    } 
 
    /** 
     * Registers the user for an AllPlayers.com account. 
     */