Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
timothydillan committed Feb 27, 2021
1 parent bdacdca commit a188727
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import androidx.appcompat.widget.Toolbar;

import android.os.Bundle;
import android.os.IBinder;
import android.util.Log;
import android.view.MenuItem;
import android.view.View;
Expand Down Expand Up @@ -72,8 +73,9 @@ public void onBackPressed() {
public void onJoinButtonClick(View v) {
// Hide the keyboard
InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
if (imm != null) {
imm.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
IBinder windowToken = getCurrentFocus().getWindowToken();
if (windowToken != null) {
imm.hideSoftInputFromWindow(windowToken, 0);
}

// If the user clicked the join button, get the circle code on the edit text,
Expand Down

0 comments on commit a188727

Please sign in to comment.