Skip to content

Commit

Permalink
Merge pull request #846 from cdhiraj40/issue842
Browse files Browse the repository at this point in the history
App Crashes while clicking on the area just above the eye icon in sign in
  • Loading branch information
SebaDro authored Nov 2, 2021
2 parents a44c938 + f9e25a6 commit 109c313
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,11 @@ protected void onDestroy() {

@OnClick(R.id.signin_background)
protected void closeKeyboard(){
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
View view = this.getCurrentFocus();
if (view != null) {
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
}
}

@OnClick(R.id.activity_signin_register_button)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,11 @@ protected void onDestroy() {

@OnClick(R.id.imageView)
protected void closeKeyboard(){
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
View view = this.getCurrentFocus();
if (view != null) {
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
}
}

@OnClick(R.id.activity_signup_login_button)
Expand Down

0 comments on commit 109c313

Please sign in to comment.