Skip to content

Commit

Permalink
Fix issue #71, so frequency doesn't accidentally get hidden when it s…
Browse files Browse the repository at this point in the history
…houldn't be.
  • Loading branch information
VanceVagell committed Nov 2, 2024
1 parent fdefb13 commit 579b657
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,9 @@ private void showScreen(ScreenType screenType) {
findViewById(R.id.sendButtonOverlay).setVisibility(View.GONE);
}
} else if (screenType == ScreenType.SCREEN_VOICE){
hideKeyboard();
findViewById(R.id.frequencyContainer).setVisibility(View.VISIBLE);

if (callsignSnackbar != null) {
callsignSnackbar.dismiss();
}
Expand Down Expand Up @@ -869,8 +872,10 @@ public void onGlobalLayout() {
}

private void hideKeyboard() {
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(this.getCurrentFocus().getWindowToken(), 0);
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
if (null != imm) {
imm.hideSoftInputFromWindow(findViewById(R.id.mainTopLevelLayout).getWindowToken(), 0);
}
}

/**
Expand Down

0 comments on commit 579b657

Please sign in to comment.