最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

android - Where is status bar overlay coming from on IME pupup? - Stack Overflow

programmeradmin0浏览0评论

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()
        }
    }
}
发布评论

评论列表(0)

  1. 暂无评论