Skip to content

Magellan 1.x Single Activity Architecture

Ryan Moelter edited this page Jul 18, 2021 · 1 revision

One Activity to rule them all

Magellan is based on the Single Activity Architecture.

This means you only have one Activity, and Magellan will swap views inside of it for you, with one custom view per Screen:

single-activity-architecture

Rotation

On rotation, the Activity and the Views are destroyed and recreated, but not the Screens.

Note: Using Magellan in an existing app with multiple Activities

It is totally possible to start using Magellan gradually or to limit its use to a small portion of an existing app. Simply use one Navigator per Activity, and start using Magellan normally. Leave the rest rest of your app the same. This is a great way to get started with Magellan in an existing app without a full rewrite, or to speed up the development process for a sub part of an app.