if i access my view via a synthetic binding, can i...
# android
w
if i access my view via a synthetic binding, can i access it in all lifecycle methods or only after
onCreateView
(for a
Fragment
)
im getting an NPE in
onSaveInstanceState
with it
v
You can only access the view when the fragment is in the resumed state.
So maybe onSaveInstanceState is getting called outside that window
w
onSaveInstanceState
is getting called after
onPause
and
onStop
as post says: it is not safe to use synthetic imports during onCreateView(), but is it safe to call it onViewCreated()