Ripple effect will continue from where it has been left off
symphonyrecords opened this issue · comments
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.
app:rv_rippleDuration="200"
This will helps you
@kvenkatesh-nyros that is not work
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);
}
});