/// <summary> /// Hide Keyboard. /// </summary> public void HideKeyBoard(bool hideWitoutNotify = false, bool hideWithoutDeselect = false, bool notCheckIsKeyboarActive = false) { if (!notCheckIsKeyboarActive && !gameObject.activeSelf) { return; } // anim.SetTrigger("Hide"); if (j_input != null && !hideWitoutNotify) { Constants.SearchString = j_input.Text; j_input.EditEnd(); if (!hideWithoutDeselect) { j_input.OnDeselect(); } } else if (voiceCommandField != null && !hideWitoutNotify) { Constants.SearchString = voiceCommandField.Text; voiceCommandField.EditEnd(); if (!hideWithoutDeselect) { voiceCommandField.OnDeselect(); } } else if (hideWitoutNotify) { if (!hideWithoutDeselect) { j_input.OnDeselect(); } } if (!isListeningForVoiceCommand) { JMRVoiceManager.OnSpeechResults -= OnSpeechResult; JMRVoiceManager.OnSpeechError -= OnSpeechError; JMRVoiceManager.OnSpeechCancelled -= OnSpeechCancelled; } isShown = false; if (!hideWitoutNotify && !hideWithoutDeselect) { this.j_input = null; } else if (hideWitoutNotify) { this.j_input = null; } special_characters.SetActive(false); alphabets.gameObject.SetActive(true); if (special_charactersText != null) { special_charactersText.SetActive(false); } if (alphabetsText != null) { alphabetsText.gameObject.SetActive(true); } gameObject.SetActive(false); OnHideKeyboard?.Invoke(); }