Open simonvar opened 5 years ago
@simonvar Not sure why it was not done in the example app, but the usage is quite straightforward.
You can create AndroidTimeCapsule
instance in onCreate
of your activity
and pass it to the feature constructor. Then in onSaveInstanceState
call saveState
method on the capsule.
You can see an example here.
@ShikaSD Is there another approaches when i inject feature?
In MVI core demo app you pass AndroidTimeCapsule in Feature2 through constructor.
How it supposed to be used with Android lifecycle methods
onRestoreInstanceState
andonSaveInstanceState
?