Michal Thomka
06/12/2021, 6:37 AMandroid:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
On orientation change it throws:
java.lang.IllegalStateException: pending composition has not been applied
at androidx.compose.runtime.CompositionImpl.drainPendingModificationsForCompositionLocked(Composition.kt:443)
at androidx.compose.runtime.CompositionImpl.composeContent(Composition.kt:475)
at androidx.compose.runtime.Recomposer.composeInitial$runtime_release(Recomposer.kt:726)
...
By removing either orientation
OR screenSize
, it behaves correctly. AndroidView factory is being fed an instance of 3rd party charting module that i persist in ViewModel to preserve its state (zoom/pan etc.) , if i give it fresh instance , the issue will not occur (but i lose the state of the chart obv.)Rafs
08/27/2022, 8:01 AM