protected void onCreate(@Nullable Bundle savedInstanceState) {
mFragments.attachHost(null /*parent*/);
super.onCreate(savedInstanceState);
NonConfigurationInstances nc =
(NonConfigurationInstances) getLastNonConfigurationInstance();
if (nc != null) {
mViewModelStore = nc.viewModelStore; //HERE IS THE ISSUE
}
I found in Android code why the ViewModelProvider should be called after the super.onCreate
the mViewModelStore is the issue
it is com.sun so it should be avoided if possible :D
Yeap
@EActivity
and @EFragment
...
@Bean
works as expected. I'm not really fan of creating more and more annotations
but this is how AA plugin system is designed to work ;)
Just a question, as dev :), would you prefer to have to learn and use those 3 new Annotations?, or simply insert the plugin on your Graddle, and everything keeps working (with the new enhancements).
So that your @EBean
which implement ViewModel
when they are injected normally with Bean
they simply, "work", no extra change?