I'm tryin to hide soft key on a bottom clicked in bottom sheet dialog fragment. I already tried this :
try {
val view: View? = requireActivity().currentFocus
if (view != null) {
(requireActivity().getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager).hideSoftInputFromWindow(
view.windowToken,
0)
}
} catch (e: Exception) {
Logger.e(TAG, "can't hide the softKey --> ${e.message}", e)
}
buy its not working on bottom sheet dialog