sharish/ScratchView

How to start an activity when scratch is reveal ?

navan0 opened this issue · 1 comments

Check the README once more you will understand it again. The view is provided with reveal listener callback that helps you to do that.

ScratchImageView scratchImageView = new ScratchImageView(this);

scratchImageView.setRevealListener(new ScratchImageView.IRevealListener() {
    @Override
    public void onRevealed(ScratchImageView tv) {
        // on reveal
      startActivity(new Intent(YourCurrentActivity.this, YourNewActivity.class);
    }

    @Override
    public void onRevealPercentChangedListener(ScratchImageView siv, float percent) {
        // on image percent reveal
    }
});

Thanks,
Harish