Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make a wizard like application in Android

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?

like image 350
Lucas S. Avatar asked Jun 18 '09 15:06

Lucas S.


1 Answers

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.

like image 154
Nimrod Dayan Avatar answered Sep 20 '22 12:09

Nimrod Dayan