I have an input box that when clicked on pops-up the soft keyboard and an overlay over the status bar renders at the same time. But when the input box loses focus, the keyboard hides but the overlay remains. Where is it coming from and how do I get rid of it? API 26/35 is that is relivant. TY
I have the keyboard hide when my FAB is pressed.
private fun setupFAB() {
applyFabStyle(R.style.FabPrimaryTheme)
compressionBinding.includeFabButton.root.setOnClickListener {
Utils.vibrate(this)
val imm = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
imm.hideSoftInputFromWindow(currentFocus?.windowToken, 0)
it.rootView.clearFocus()
compressionViewModel.performComputation()
}
compressionViewModel.calculationError.observe(this) { error ->
if (error.isNotEmpty()) {
displaySnackbar(error)
} else {
scrollToOutputHeading()
}
}
}