poldz123 / ShapeRipple

Apache License 2.0
558 stars 105 forks source link

animation is not smooth #4

Open Shrikant-B opened 7 years ago

Shrikant-B commented 7 years ago

Is it necessary to pass value to this function ripple.setRippleMaximumRadius() below 500? I'm asking this because when I gave rippleMaximumRadius say 1000 then view does not animate smoothly. I experienced lags during animation. What is solution for this?

Here is xml for view: <com.rodolfonavalon.shaperipplelibrary.ShapeRipple android:id="@+id/rippleView" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_centerInParent="true" custom:ripple_stroke_width="15dp" />

Here is android code: mShapeRippleView.setRippleShape(new Circle()); mShapeRippleView.setRippleCount(5); mShapeRippleView.setRippleDuration(5000); mShapeRippleView.setEnableColorTransition(true); mShapeRippleView.setRippleMaximumRadius(1000);

poldz123 commented 7 years ago

Unfortunately, there is no way to optimize it outside the library, seems that you are using a slow device, but I would recommend using a lower radius for slow devices.

Optimizing the library would require more tinkering which is still in progress.

Shrikant-B commented 7 years ago

Device i'm using is ASUS Nexus tablet model no ME370T with android 5.1.1. I tried my app on other devices there also i experienced some lag.