protected Step getStep(int position) { if (position >= sSteps.size()) { return null; } Step step = sSteps.get(position); step.setContext(this); return step; }
protected Step getPostStep() { int position = mStepIndex; if (position >= sSteps.size()) { return null; } Step step = sSteps.get(position); if (sStepOptional.containsKey(step) && !sStepOptional.get(step).check()) { mStepIndex++; return getPostStep(); } step.setContext(this); System.out.println("Returning " + position); hideSoftInput(); return step; }
protected Step getPreviousStep() { System.out.println("They called previous step! " + mStepIndex); if (mStepIndex >= sSteps.size()) { return null; } Step step = sSteps.get(mStepIndex); if (sStepOptional.containsKey(step) && !sStepOptional.get(step).check()) { mStepIndex--; if (mStepIndex < 0) { finish(); return null; } return getPreviousStep(); } step.setContext(this); System.out.println("Returning " + mStepIndex); return step; }