After tap at Button, when ripple animation finishes i got this exception:
11-16 17:07:52.128 E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.axxonsoft.livestream, PID: 21412
java.lang.IllegalStateException: Underflow in restore - more restores than saves
at android.graphics.Canvas.native_restore(Native Method)
at android.graphics.Canvas.restore(Canvas.java:540)
at com.andexert.library.RippleView.draw(RippleView.java:166)
at android.view.View.updateDisplayListIfDirty(View.java:15198)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3594)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3574)
at android.view.View.updateDisplayListIfDirty(View.java:15158)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3594)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3574)
at android.view.View.updateDisplayListIfDirty(View.java:15158)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3594)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3574)
at android.view.View.updateDisplayListIfDirty(View.java:15158)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3594)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3574)
at android.view.View.updateDisplayListIfDirty(View.java:15158)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3594)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3574)
at android.view.View.updateDisplayListIfDirty(View.java:15158)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3594)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3574)
at android.view.View.updateDisplayListIfDirty(View.java:15158)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:283)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:289)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:324)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2642)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2461)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2094)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1134)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6050)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:860)
at android.view.Choreographer.doCallbacks(Choreographer.java:672)
at android.view.Choreographer.doFrame(Choreographer.java:608)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:846)
at android.os.Handler.handleCallback(Handler.java:742)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:5529)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
With this layout
After tap at Button, when ripple animation finishes i got this exception: