mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 18:51:51 +01:00
Move window setSoftInputMode for older devices to change completed instead of started
This commit is contained in:
parent
11f05133af
commit
664f487cd1
@ -340,6 +340,15 @@ open class MainActivity : BaseActivity<MainActivityBinding>(), DownloadServiceLi
|
||||
binding.appBar.y = 0f
|
||||
nav.translationY = 0f
|
||||
showDLQueueTutorial()
|
||||
if (router.backstackSize == 1) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R && !isPush) {
|
||||
window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN)
|
||||
}
|
||||
} else {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
|
||||
window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
@ -774,15 +783,9 @@ open class MainActivity : BaseActivity<MainActivityBinding>(), DownloadServiceLi
|
||||
setFloatingToolbar(canShowFloatingToolbar(to))
|
||||
val onRoot = router.backstackSize == 1
|
||||
if (onRoot) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R && !isPush) {
|
||||
window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN)
|
||||
}
|
||||
binding.toolbar.navigationIcon = searchDrawable
|
||||
binding.cardToolbar.navigationIcon = searchDrawable
|
||||
} else {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
|
||||
window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE)
|
||||
}
|
||||
binding.toolbar.navigationIcon = drawerArrow
|
||||
binding.cardToolbar.navigationIcon = drawerArrow
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user