#AndroidDev On Wizards
Entering data and filling out forms on mobile devices kind of sucks. Because of this, you generally want to put as much of the burden of data entry on yourself—the developer—as you can, and as little on the end user as possible. For example, registration forms with 10 input fields are likely to annoy users far more than those with only 2 input fields… or one… or even none (auto-fill the email and auto-generate a password!).
Having said that, there are a number of very fair use cases that require a lot of user input, or complex user input, and have potentially nontrivial consequences. For example, customizing and ordering physical goods, scheduling bank transactions, or setting up a complex app (or operating system!) for the first time.
While you can generally design single-page data entry forms for such processes, sometimes it's more effective to guide the user through the process step-by-step, explaining things along the way, and giving her a sense of comfort about her progress. It's generally also comforting to provide a 'review' step at the end, letting the user get an overview of what's about to happen before pressing the big red 'execute' button.
On Android, there hasn't been much documentation around designing wizards (something I hope we address), or great open source examples of wizards (at least as far as I know), so I'd like to offer one such 'reference' example implementation.
You can get the code here:http://code.google.com/p/romannurik-code/source/browse/misc/wizardpager
There are a few key features I'd like to call out about this implementation:
• Branching, or the ability for wizard steps to influence the availability of later steps
• Allowing the user to review before committing
• Allowing the user freeform navigation between wizard steps
• Support for required and optional steps
• Support for step classes (technically, each step is an instance of a Java class, so you can have multiple instances within the wizard)
As for things that are missing, one major missing piece is optimization for larger screens. That's something I'm hoping to work on soon.
As usual, I've attached a few screenshots to whet the appetite before you check out the code.
Let me know in the comments if you've got ideas for improvements or questions. And feel free to just fork the code and discuss your changes!