suarezjulian / WizardPager

Wizard Pager is a library that provides an example implementation of a Wizard UI on Android, it's based of Roman Nurik's wizard pager (https://github.com/romannurik/android-wizardpager)
Apache License 2.0
514 stars 148 forks source link

Complex branching with Conditionals #10

Open str4d opened 9 years ago

str4d commented 9 years ago

I wrote this over a year ago in my popular fork of Roman's sample code, and have been using it in an app ever since. But I want to move the wizard code from the app into a library, and I thought it would be better to contribute to a library someone has already started :) (I am hoping of course that a new version of the library would be released soon after any eventual merge, so that I can actually use this library.)

These commits enable complex branching structures to be developed, where Pages can be enabled or disabled depending on earlier choices. The alternative is to duplicate pages across branches, which is much messier.

I welcome any comments you have. In particular, I'm not sure that my original decision to allow multiple Conditional objects per Page is necessary, because there would be no difference between the Conditional objects other than what later pages used them for conditions. I should also add some sort of check that a Conditional object is not added to multiple pages, which would cause subtle breakages. (Neither of these mattered before because I was the only user, and my use case wasn't that complex.)

suarezjulian commented 9 years ago

@str4d Thank you so much!, this looks great!, I wonder if you could also modify the sample to include a basic implementation of the conditional functionality. Feel free to modify the sample app or to create a completely new sample app