kviewmodel--mpp icon indicating copy to clipboard operation
kviewmodel--mpp copied to clipboard

Screen Rotation Handling

Open lordsxrom opened this issue 2 years ago • 1 comments

Could you explain how a ViewModel can survive screen rotation please?

Does it could help me? LocalRootController.current.setupWithViewModels()

lordsxrom avatar Apr 22 '23 18:04 lordsxrom

Hello. To handle screen rotation you need to save viewmodel when changing configuration, which requires integration with navigation (to receive a callback on the screen close event and delete saved viewmodel). At the moment the library only supports navigation with Odyssey, in a separate kviewmodel-odyssey artifact

Skeptick avatar May 02 '23 07:05 Skeptick