Skip to content

Platform Navigation

Question

Describe navigation in Android and iOS (Fragments, Activities, ViewControllers, Storyboards)

Short interview answer

Android activities are entry points for user interaction and fragments represent reusable UI behavior within an activity. On iOS, view controllers manage screens or portions of a UI, while storyboards can describe scenes and transitions. Navigation must follow each platform’s lifecycle and back behavior.

Detailed answer

On Android, an activity participates in the system lifecycle and can host fragments; fragments have their own view lifecycle and should be managed through the FragmentManager. On iOS, view controllers coordinate a view hierarchy and navigation containers determine transitions between screens; a storyboard is one way to define scenes and their relationships visually. A cross-platform abstraction can express an app-level route such as “show invoice”, but implementation must preserve the platform’s lifecycle and state-restoration expectations instead of assuming the models are identical.

Glossary

  • UI: User interface.

Sources