[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

[node8-android] appS8 UI framework internal details

In MainActivity>>defaultNavMenuTitles navigator menu options are defined.
These strings match the id defined by AndroidCoordinator class>>id, a navigator menu option defines which will be the rootCoordinator of a possible stack of coordinators.

Each coordinator instance holds a fragment that will be stacked in Android backstack.
Fragments and coordinators are stacked and this stack is held by AndroidApplicationThread (there will be anAndroidApplicationThread for each navigator option menu).

Why are coordinators also stacked? because if coordinator menu option changes we want all the stacked coordinators to be restored. Therefore when a option menu changes the backstack is emptied and replaced with all the fragments of the stacked coordinators, recreating the backstack.

When the app switches to a cordinator (the coordinator is placed at the top of the stack AndroidApplicationThread>>switchToUiNamed:), coordinator's fragment is replaced (MainActivity>>switchToFragmentNamed:clear:activate:), and the corresponding view inflated (AndroidApplication>>inflateFragmentView).