siriscac / RippleView

View that imitates Ripple Effect on click which was introduced in Android L (for Android 2.3+)
1.15k stars 284 forks source link

RippleView ICS FATAL EXCEPTION #6

Closed fcannizzaro closed 10 years ago

fcannizzaro commented 10 years ago

Hi.. I noticed that using the ripple view inside a listview item, if Android version is ICS, this cause app's crash.. Instead on Android 4.4 it works well.

Logcat:

09-13 22:52:11.594 20969-20969/com.wax.app E/AndroidRuntime﹕ FATAL EXCEPTION: main java.lang.UnsupportedOperationException at android.view.GLES20Canvas.clipPath(GLES20Canvas.java:408) at com.indris.material.RippleView.onDraw(RippleView.java:222) at android.view.View.draw(View.java:10982) at android.view.View.getDisplayList(View.java:10421) at android.view.ViewGroup.drawChild(ViewGroup.java:2850) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489) at android.view.View.getDisplayList(View.java:10419) at android.view.ViewGroup.drawChild(ViewGroup.java:2850) at android.widget.ListView.drawChild(ListView.java:3223) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489) at android.widget.AbsListView.dispatchDraw(AbsListView.java:2092) at android.widget.ListView.dispatchDraw(ListView.java:3218) at android.view.View.draw(View.java:10985) at android.widget.AbsListView.draw(AbsListView.java:3398) at android.view.View.getDisplayList(View.java:10421) at android.view.ViewGroup.drawChild(ViewGroup.java:2850) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489) at android.view.View.getDisplayList(View.java:10419) at android.view.ViewGroup.drawChild(ViewGroup.java:2850) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489) at android.view.View.draw(View.java:10985) at android.support.v4.view.ViewPager.draw(ViewPager.java:2176) at android.view.View.getDisplayList(View.java:10421) at android.view.ViewGroup.drawChild(ViewGroup.java:2850) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2489) at android.view.View.getDisplayList(View.java:10419) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2597) at android.view.View.getDisplayList(View.java:10384) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2597) at android.view.View.getDisplayList(View.java:10384) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2597) at android.view.View.getDisplayList(View.java:10384) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2597) at android.view.View.getDisplayList(View.java:10384) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2597) at android.view.View.getDisplayList(View.java:10384) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2597) at android.view.View.getDisplayList(View.java:10384) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2597) at android.view.View.getDisplayList(View.java:10384) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2597) at android.view.View.getDisplayList(View.java:10384) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2597) at android.view.View.getDisplayList(View.java:10384) at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:842) at android.view.ViewRootImpl.draw(ViewRootImpl.java:1935) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1659) at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2467) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4424) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132) at dalvik.system.NativeStart.main(Native Method)

kyze8439690 commented 10 years ago

Try cancel canvas clip in onDraw

fcannizzaro commented 10 years ago

It works!

kyze8439690 commented 10 years ago

It 's a bug, canvas clipPath only works with hardware accerelate closed on devices prior to api 18.Would you please try to close the hareware accerelation and see whether this crash will be reproduced again?