Fré Dumazy
01/05/2018, 11:10 AMActivity.onCreate()
, then adding the Fragment
, which uses this property in its onCreate()
When the Activity is recreated after being killed, it first creates its fragments again, causing Fragment.onCreate()
to be called before the initialization in Activity.onCreate()
. Is there any way to fix this, or is my design wrong?
I've posted this on SO as well: https://stackoverflow.com/questions/48112311/lateinit-property-not-initialized-when-activity-is-re-createdhallvard
01/05/2018, 1:05 PMby lazy
instead?Fré Dumazy
01/05/2018, 1:38 PMby lazy
helped in my case, but I'm not sure if this can help in all cases in general 🤔