Skip to content
This repository has been archived by the owner on Jan 3, 2019. It is now read-only.

WizardFragment.onStepChanged() does not notify about all changes #63

Open
hsz opened this issue May 8, 2015 · 4 comments
Open

WizardFragment.onStepChanged() does not notify about all changes #63

hsz opened this issue May 8, 2015 · 4 comments
Assignees
Labels

Comments

@hsz
Copy link

hsz commented May 8, 2015

Let's assume we've got this simple implementation:

public class ProfileWizardFragment extends WizardFragment {

    @Override
    public void onStepChanged() {
        super.onStepChanged();
        Log.d("onStepChanged()", String.valueOf(wizard.getCurrentStepPosition()));
    }

    @OnClick(R.id.next_button)
    public void next() {
        wizard.goNext();
        Log.d("next()", String.valueOf(wizard.getCurrentStepPosition()));
    }

}

When user clicks next_button once, there is next() method called and then onStepChanged() method. Next step from the queue is presented.

Log result:

D/onStepChanged(): 1
D/next(): 1

But when user clicks on the button few times very quickly, onStepChanged() is called only once at the beginning, meanwhile next() catches all of the events:

D/onStepChanged(): 2
D/next(): 2
D/next(): 3
D/next(): 4
D/next(): 5

In fact, view is updating properly on the time (we can see all of the views: 2, 3, 4, 5 during the clicking).

@Nimrodda
Copy link
Owner

Nimrodda commented May 8, 2015

And what happens if you fast swipe the pages? Did you test?

@hsz
Copy link
Author

hsz commented May 8, 2015

@Nimrodda Thank you for the quick response.

It works fine with swiping the pages.

In fact I've also observed that it doesn't notify about all of the subpages when you go back with back button.

onStepChanged() is called for the 5 element even if you press back button 4 times and finally you are on the 2 element. After a delay and pressing back button once again, it logs 1:

D/onStepChanged(): 5
D/onStepChanged(): 1

@Nimrodda Nimrodda added the bug label May 8, 2015
@Nimrodda Nimrodda self-assigned this May 8, 2015
@hsz
Copy link
Author

hsz commented May 29, 2015

Any plans for fixing any of the bugs in this project ?

@Nimrodda
Copy link
Owner

Hello @hsz and thank you for your feedback. WizarDroid is an open source project developed in my spare time (which is extremely limited these days). You may contribute a fix yourself if you're unsatisfied of the progress done in the project. Any contribution is highly appreciated. Thanks!

Repository owner locked and limited conversation to collaborators May 29, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants