use of com.cjsoftware.library.core.ObjectRegistry in project ucsFramework by cjsoftware-lib.
the class AbstractUiDialogFragment method onSaveInstanceState.
// endregion
// region Android lifecycle
@CallSuper
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
ObjectRegistry objectRegistry = getObjectRegistry();
outState.putString(STATE_CONTRACT_BROKER, objectRegistry.put(mContractBroker));
}
use of com.cjsoftware.library.core.ObjectRegistry in project ucsFramework by cjsoftware-lib.
the class AbstractUiFragment method restoreContractBroker.
// endregion
// region private helper methods
private ContractBroker<UiT, NavigationT, CoordinatorT, StateManagerT> restoreContractBroker(Bundle savedState) {
ContractBroker<UiT, NavigationT, CoordinatorT, StateManagerT> coordinator = null;
ObjectRegistry objectRegistry = getObjectRegistry();
String coordinatorKey = savedState.getString(STATE_CONTRACT_BROKER);
if (coordinatorKey != null) {
coordinator = objectRegistry.get(coordinatorKey);
}
return coordinator;
}
use of com.cjsoftware.library.core.ObjectRegistry in project ucsFramework by cjsoftware-lib.
the class AbstractSmvpActivity method onSaveInstanceState.
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
// Save the Presenter & Model stack.
ObjectRegistry objectRegistry = getObjectRegistry();
String presenterStackKey = objectRegistry.put(getPresenter());
outState.putString(SAVED_PRESENTER_STACK_KEY, presenterStackKey);
}
Aggregations