I have the following logic that sets a custom animation for my DialogFragment to slide in and out from the right hand screen in Kotlin.
dialog?.window?.attributes?.windowAnimations = R.style.dialog_style
Everything is great, but when I go to my mobile phone's home screen and effectively placing my app into the background and then when I bring it back I see that the animation activates as well.
Is there a way to temporarily disable the animation whenever I reopen the application from the background and then restore the animation when the DialogFragment loads.
It looks weird in my opinion to see the DialogFragment transition in when I reopen the app, it looks better when there is no animation (default style)
I want the custom animation to apply only when I'm navigating between fragments in my app, but no animation when the fragment is resumed from a background state (paused?).