use of com.example.mortar.screen.GsonParceler in project mortar by square.
the class MortarDemoActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
GsonParceler parceler = new GsonParceler(new Gson());
@SuppressWarnings("deprecation") FlowDelegate.NonConfigurationInstance nonConfig = (FlowDelegate.NonConfigurationInstance) getLastNonConfigurationInstance();
MortarScope parentScope = MortarScope.getScope(getApplication());
String scopeName = getLocalClassName() + "-task-" + getTaskId();
activityScope = parentScope.findChild(scopeName);
if (activityScope == null) {
activityScope = parentScope.buildChild().withService(BundleServiceRunner.SERVICE_NAME, new BundleServiceRunner()).build(scopeName);
}
ObjectGraphService.inject(this, this);
getBundleServiceRunner(activityScope).onCreate(savedInstanceState);
actionBarOwner.takeView(this);
setContentView(R.layout.root_layout);
container = (PathContainerView) findViewById(R.id.container);
containerAsHandlesBack = (HandlesBack) container;
flowDelegate = FlowDelegate.onCreate(nonConfig, getIntent(), savedInstanceState, parceler, History.single(new ChatListScreen()), this);
}
Aggregations