Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scratchView onProgress always returns 0 #4

Open
tao101 opened this issue Apr 27, 2017 · 1 comment
Open

scratchView onProgress always returns 0 #4

tao101 opened this issue Apr 27, 2017 · 1 comment

Comments

@tao101
Copy link

tao101 commented Apr 27, 2017

private int getPercent(){
        perc = 0;
        scratchView.setEraseStatusListener(new ScratchView.EraseStatusListener() {
            @Override
            public void onProgress(int percent) {
                perc = percent;
            }

            @Override
            public void onCompleted(View view) {

            }
        });


        return perc;
    }

scratchView onProgress doesn't return the percent always returns 0
can you help me solve this

@malisonmez13
Copy link

use
executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, width, height);
instead of
execute(width, height);

inside onErase() method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants