traex / RippleEffect

Implementation of Ripple effect from Material Design for Android API 9+
MIT License
4.92k stars 1.08k forks source link

Ripple effect will continue from where it has been left off #130

Open symphonyrecords opened 7 years ago

symphonyrecords commented 7 years ago

I've added a ripple effect to a view. a new activity will be started onClick. But when I come back to the previous activity(previous view) the ripple effect will finish its animation from where it was left off. Is there any workaround for this? Thank you.

kvenkatesh-nyros commented 6 years ago

app:rv_rippleDuration="200" This will helps you

zxyaust commented 6 years ago

@kvenkatesh-nyros that is not work

NourZohdy commented 5 years ago

Don't attaching the Clicking event to the "setOnClickListener" in the view, instead attach it with the rippleView instance ,by setting "setOnRippleCompleteListener". so that the event triggers only when the ripple effect completes.

  RippleView rippleView = (RippleView) findViewById(R.id.rippleview);
        rippleView.setOnRippleCompleteListener(new RippleView.OnRippleCompleteListener() {
            @Override
            public void onComplete(RippleView rippleView) {
                // Start your activity as normal 
                Intent intent = new Intent(MainActivity.this, newActivity.class);
                startActivity(intent);
            }
        });