mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-20 03:39:19 +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
|
binding.appBar.y = 0f
|
||||||
nav.translationY = 0f
|
nav.translationY = 0f
|
||||||
showDLQueueTutorial()
|
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))
|
setFloatingToolbar(canShowFloatingToolbar(to))
|
||||||
val onRoot = router.backstackSize == 1
|
val onRoot = router.backstackSize == 1
|
||||||
if (onRoot) {
|
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.toolbar.navigationIcon = searchDrawable
|
||||||
binding.cardToolbar.navigationIcon = searchDrawable
|
binding.cardToolbar.navigationIcon = searchDrawable
|
||||||
} else {
|
} else {
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
|
|
||||||
window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE)
|
|
||||||
}
|
|
||||||
binding.toolbar.navigationIcon = drawerArrow
|
binding.toolbar.navigationIcon = drawerArrow
|
||||||
binding.cardToolbar.navigationIcon = drawerArrow
|
binding.cardToolbar.navigationIcon = drawerArrow
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user