Open kyao-Frndz opened 6 years ago
Hi, Could you explain a bit more what do you mean by resetting the stepper? Could you also explain why you would want to do it, please?
@zawadz88 thanks for your early response. I am using the stepper for a e-commerce transaction such that the user provide data step by step and at the end a dialog pops up to ask if the user would like to perform some transaction again and if yes the stepper should go back to step 1 and clear the previous data.
Hi @kyao-Frndz,
Have you tried calling StepperLayout#setAdapter(StepAdapter stepAdapter, int)
with a new adapter to accomplish this?
I'm not 100% sure that it'll do the trick so please let me now if it helped.
hi @zawadz88,
Sorry for the late response, I resolved it by calling StepperLayout#.setCurrentStepPosition(0)
and setting static boolean variables to clear data already entered. Still looking a better way to handle it though.
I will give your suggestion a try and feedback.
Thanks a bunch.
does it have support for android x?
does it have support for android x?
It's trivial to migrate it. Android Studio will probably do it for you with the migrate command.
Hi Could you help me with a solution to reset material stepper after the step have completed by the user. I tried setCurrentItem on the ViewPager but did not work.
Your assistance will be much appreciated.