Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Region.Op - only INTERSECT and DIFFERENCE #7

Open
Yaque opened this issue Oct 12, 2019 · 0 comments
Open

Invalid Region.Op - only INTERSECT and DIFFERENCE #7

Yaque opened this issue Oct 12, 2019 · 0 comments

Comments

@Yaque
Copy link

Yaque commented Oct 12, 2019

I use it in android 9.0. something happened
Process: com.aiocw.termsinnocent, PID: 5980
java.lang.IllegalArgumentException: Invalid Region.Op - only INTERSECT and DIFFERENCE are allowed
at android.graphics.Canvas.checkValidClipOp(Canvas.java:789)
at android.graphics.Canvas.clipRect(Canvas.java:836)
at com.jpardogo.android.flabbylistview.lib.FlabbyLayout.onDraw(FlabbyLayout.java:59)
at android.view.View.draw(View.java:20226)
at android.view.View.updateDisplayListIfDirty(View.java:19101)
at android.view.View.draw(View.java:19954)

about this erro. FlabbyLayout.java
@Override protected void onDraw(final Canvas canvas) { if (mWidth == 0) mWidth = getWidth(); if (mHeight == 0) mHeight = getHeight(); mRect = canvas.getClipBounds(); mRect.inset(0, -mHeight / 2); canvas.clipRect(mRect, Region.Op.REPLACE); float startX1;

use this
if(Build.VERSION.SDK_INT >= 28){ canvas.clipPath(mPath0); }else { canvas.clipPath(mPath0, Region.Op.XOR); }
to replace

could you fix this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant