Nimrodda/WizarDroid — pull request #26 by pommedeterresautee (2013-10-25 11:53:53+00:00)
Title: #22 For test purpose - first try to implement a cut-off method

The issue I have is about letting now the Wizard class that the WizardStep state switched to completed = true.
For that I need to inject a SAM (here the Refresh class) which will :
- apply the cut off method (to add/remove pages after the current step, depending of isCompleted is true or not)
- refresh the viewpager adapter (notify data set changed)

Unfortunately, there is a major issue. It s not possible to notify data set changed during the creation of the fragment because the fragment is created inside the ViewPager. Doing so create a crash because the ViewPager has not finished to initiate the Fragment that a call to refresh it is done. I have put a kind of workaround to avoid that (just a boolean guard set to false until the fragment reach the onStart method).

The current implementation is not well designed, the main issue is to find another way to check if the step is completed or not.

If you have any idea...

Regards