Closed jbaginski closed 9 years ago
At the moment it only works for boxed primitives like Integer
or Double
but I see no reason not to make it work with all the other types. Some work is necessary to accommodate this feature but when I have some free time on my hands I can happily add it.
Could you clarify your use case for me a bit?
At the moment the first time a Fragment is initialised the Bundle in null so Icepick doesn't do anything.
The first time a Fragment is paused Icepick writes in the Bundle the current value of your fields. If you've not reassigned them that's the default value you initialised them with.
The next time the Fragment is restored there will always be a value in the Bundle because it was paused at least once. It will be either the initial value that you used in initialisation or any value you assigned to the field.
Where do default values will have a chance of being used in such scenario?
silly me, please ignore this ticket :)
is it possible to add support for default values?