Make a wizard like application in Android

Lucas S. picture Lucas S. · Jun 18, 2009 · Viewed 18.8k times · Source

Which you think is the best way of doing a wizard like application (user can navigate between screens with a next and back button, and each screen has to save some state data) in Android platform.

I mainly can think in two approaches:

  1. Having one activity+view for each screen and then i make the screen switch by calling each activity. What make this nice is that i can use the system back button as my back handler and i don't have to take care of that myself, aslo each activity will save it's own state.

  2. Having one activity and many views, and what i switch views in each screen change, this helps me re-use more code, but makes saving states a mess.

What do you think? Which is the best way of doing this on Android?

Answer

Nimrod Dayan picture Nimrod Dayan · Apr 1, 2013

This library is no longer being developed.

Use Android Navigation Component with combination of ViewModels to build a wizard flow.


I've developed a lightweight Android library, which is built on top of Android's ViewPager that can be used for creating wizard like activities. Check it out: WizarDroid.