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

ActionViewSamplesFragment报错 #1

Open
zebraoo opened this issue Sep 10, 2021 · 1 comment
Open

ActionViewSamplesFragment报错 #1

zebraoo opened this issue Sep 10, 2021 · 1 comment

Comments

@zebraoo
Copy link

zebraoo commented Sep 10, 2021

java.lang.IllegalArgumentException: path must be convex
at android.graphics.Outline.setConvexPath(Outline.java:284)
at io.github.vejei.bottomnavigationbar.BottomNavigationBar$1.getOutline(BottomNavigationBar.java:144)
at android.view.View.rebuildOutline(View.java:15020)
at android.view.View.setBackgroundBounds(View.java:19561)
at android.view.View.drawBackground(View.java:19526)
at android.view.View.draw(View.java:19307)
at io.github.vejei.bottomnavigationbar.BottomNavigationBar.draw(BottomNavigationBar.java:385)
at android.view.View.updateDisplayListIfDirty(View.java:18239)
at android.view.View.draw(View.java:19037)
at android.view.ViewGroup.drawChild(ViewGroup.java:4297)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4083)
at androidx.constraintlayout.widget.ConstraintLayout.dispatchDraw(ConstraintLayout.java:1975)
at android.view.View.updateDisplayListIfDirty(View.java:18230)
at android.view.View.draw(View.java:19037)
at android.view.ViewGroup.drawChild(ViewGroup.java:4297)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4083)
at android.view.View.draw(View.java:19330)
at android.widget.ScrollView.draw(ScrollView.java:1739)
at android.view.View.updateDisplayListIfDirty(View.java:18239)
at android.view.View.draw(View.java:19037)
at android.view.ViewGroup.drawChild(ViewGroup.java:4297)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4083)
at android.view.View.updateDisplayListIfDirty(View.java:18230)
at android.view.View.draw(View.java:19037)
at android.view.ViewGroup.drawChild(ViewGroup.java:4297)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4083)
at android.view.View.updateDisplayListIfDirty(View.java:18230)
at android.view.View.draw(View.java:19037)
at android.view.ViewGroup.drawChild(ViewGroup.java:4297)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4083)
at android.view.View.updateDisplayListIfDirty(View.java:18230)
at android.view.View.draw(View.java:19037)
at android.view.ViewGroup.drawChild(ViewGroup.java:4297)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4083)
at android.view.View.updateDisplayListIfDirty(View.java:18230)
at android.view.View.draw(View.java:19037)
at android.view.ViewGroup.drawChild(ViewGroup.java:4297)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4083)
at android.view.View.updateDisplayListIfDirty(View.java:18230)
at android.view.View.draw(View.java:19037)
at android.view.ViewGroup.drawChild(ViewGroup.java:4297)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4083)
at android.view.View.draw(View.java:19330)
at com.android.internal.policy.DecorView.draw(DecorView.java:789)
at android.view.View.updateDisplayListIfDirty(View.java:18239)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:669)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:675)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:783)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:3117)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2926)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2464)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1446)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7014)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:916)
at android.view.Choreographer.doCallbacks(Choreographer.java:728)
at android.view.Choreographer.doFrame(Choreographer.java:660)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:902)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6523)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)

setOutlineProvider(new ViewOutlineProvider() {
@OverRide
public void getOutline(View view, Outline outline) {
outline.setConvexPath(outlinePath);
}
});

@chenzz66
Copy link

API 27 之前的问题 >
setOutlineProvider(new ViewOutlineProvider() {

        @Override
        public void getOutline(View view, Outline outline) {
            //添加判断
              if (outlinePath.isConvex()) {
                    outline.setConvexPath(outlinePath);
              }
        }
    });

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

2 participants