ScratchView icon indicating copy to clipboard operation
ScratchView copied to clipboard

scratchView onProgress always returns 0

Open tao101 opened this issue 7 years ago • 1 comments

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

tao101 avatar Apr 27 '17 20:04 tao101

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

inside onErase() method.

malisonmez13 avatar Jan 05 '18 08:01 malisonmez13