I have added five fragments in my activity. also i have added Theme.Material3.Light.NoActionBar
theme to both of my day and night theme in app. when i change theme from quick toggle theme changer, theme is changing but fragment is restarting.
attached .gif
video for better understanding what i want to tell.
I tried changing android:configChanges="uiMode"
but it didn't work as it is not switching theme in app upon changing from system.