Created
April 20, 2016 22:45
-
-
Save LTroya/2e2f1433781edf59750941116cf1ca0d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Converter<ResponseBody, Error> errorConverter = | |
ServiceGenerator.retrofit.responseBodyConverter(Error.class, new Annotation[0]); | |
try { | |
Error error = errorConverter.convert(response.errorBody()); | |
if (error.getCode().equals(ERROR_STATUS)) { | |
if (!inputUsername.requestFocus()) { | |
inputUsername.requestFocus(); | |
} | |
Toast.makeText(SignUpActivty.this, getString(R.string.sign_up_username_exists), Toast.LENGTH_LONG).show(); | |
} | |
} catch (IOException e) { | |
e.printStackTrace(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment