Skip to content

Commit

Permalink
utilized runnable that's posted when the UI has been drawn.
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-alexander committed Apr 1, 2020
1 parent ab37113 commit 858decb
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,12 @@ protected void setupContent(ViewGroup rootView) {
if (BuildConfig.DEBUG) {
mEmailInput.getEditText().setText(BuildConfig.DEBUG_WPCOM_LOGIN_EMAIL);
}
mEmailInput.addTextChangedListener(this);
mEmailInput.post(new Runnable() {
@Override public void run() {
mEmailInput.addTextChangedListener(LoginEmailFragment.this);
}
});

mEmailInput.setOnEditorCommitListener(this);
mEmailInput.getEditText().setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
Expand Down Expand Up @@ -393,6 +398,7 @@ public void beforeTextChanged(CharSequence s, int start, int count, int after) {
public void onTextChanged(CharSequence s, int start, int before, int count) {
mEmailInput.setError(null);
mIsSocialLogin = false;
mIsValidEmail = null;
}

private void showEmailError(int messageId) {
Expand Down

0 comments on commit 858decb

Please sign in to comment.