Launch Module

← App map · The main activity with its five-tab bottom navigation, and the first-run onboarding and personalization that run on top of it once.

Screenshots scroll sideways · tap to enlarge

What it does

MainActivity is the launcher activity. It hosts MainFragment, whose ViewPager2 holds one fragment per NavTab — Home, Saved, Search (the reading history), Activity — and a fifth bottom-navigation item, More, that opens a bottom sheet instead of a page. Tapping Search again while it is selected opens the search screen. On a first launch (Prefs.isInitialOnboardingEnabled, and not opened to preview a shared reading list) the activity starts InitialOnboardingActivity: a Compose flow of three screens — intro, data & privacy, and languages (with Add language). Finishing it turns the flag off and starts PersonalizationActivity, which asks about curiosity, interests and which Home feed to see first. When onboarding returns, the main activity switches the Home tab to the chosen feed (For You for a personalized choice, otherwise Community) and its language. Badges on the tabs mark a new recommended reading list on Saved and the unseen Activity onboarding or Year in Review on Activity; a notification bell sits in the toolbar.

Logic class diagram

One activity, one fragment of tabs; each tab's fragment is created by its enum value.

Screen composition

First launch sequence

Onboarding is a separate activity; the main screen only learns the outcome through the activity result.

Key files