nhaarman / acorn

Mastering Android navigation :chipmunk:
https://nhaarman.github.io/acorn
Apache License 2.0
181 stars 7 forks source link

Allow Scenes to provide their own ViewController instances. #91

Closed nhaarman closed 5 years ago

nhaarman commented 5 years ago

To get started easier, Scenes will be able to create their own ViewController instances, much like Fragment's onCreateView.

From a purists' point of view, this is unwanted: the Scene will have a direct dependency on the Container implementation. However, for trivial cases being able to provide a ViewController directly greatly reduces boilerplate, and keeps related code together.

Scenes providing ViewControllers can be used together with the decoupled ViewControllerFactory way of providing ViewControllers; the Scene has precedence.