fix: requestFeature causing problem

This commit is contained in:
ziro 2024-02-12 08:34:06 +07:00
parent b5527c579d
commit c4ed991c79
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
2 changed files with 4 additions and 4 deletions

View file

@ -242,8 +242,6 @@ open class MainActivity : BaseActivity<MainActivityBinding>() {
}
override fun onCreate(savedInstanceState: Bundle?) {
val splashScreen = maybeInstallSplashScreen(savedInstanceState)
// Set up shared element transition and disable overlay so views don't show above system bars
window.requestFeature(Window.FEATURE_ACTIVITY_TRANSITIONS)
setExitSharedElementCallback(
@ -268,6 +266,8 @@ open class MainActivity : BaseActivity<MainActivityBinding>() {
)
window.sharedElementsUseOverlay = false
val splashScreen = maybeInstallSplashScreen(savedInstanceState)
super.onCreate(savedInstanceState)
backPressedCallback = object : OnBackPressedCallback(enabled = true) {

View file

@ -275,8 +275,6 @@ class ReaderActivity : BaseActivity<ReaderActivityBinding>() {
* Called when the activity is created. Initializes the view model and configuration.
*/
override fun onCreate(savedInstanceState: Bundle?) {
val splashScreen = maybeInstallSplashScreen(savedInstanceState)
// Setup shared element transitions
if (intent.extras?.getString(TRANSITION_NAME) != null) {
window.requestFeature(Window.FEATURE_ACTIVITY_TRANSITIONS)
@ -293,6 +291,8 @@ class ReaderActivity : BaseActivity<ReaderActivityBinding>() {
}
}
val splashScreen = maybeInstallSplashScreen(savedInstanceState)
super.onCreate(savedInstanceState)
binding = ReaderActivityBinding.inflate(layoutInflater)
setContentView(binding.root)