mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
Use viewCompat to check if IME is visible
This commit is contained in:
parent
35dd94c179
commit
97bcecc1d1
1 changed files with 2 additions and 1 deletions
|
@ -951,7 +951,8 @@ open class MainActivity : BaseActivity<MainActivityBinding>(), DownloadServiceLi
|
|||
|
||||
private fun pressingBack() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU &&
|
||||
window.decorView.rootWindowInsets?.isVisible(WindowInsetsCompat.Type.ime()) == true
|
||||
ViewCompat.getRootWindowInsets(window.decorView)
|
||||
?.isVisible(WindowInsetsCompat.Type.ime()) == true
|
||||
) {
|
||||
WindowInsetsControllerCompat(window, binding.root).hide(WindowInsetsCompat.Type.ime())
|
||||
} else if (actionMode != null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue