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

魅族16x开启夜间模式,系统崩溃 #81

Open
happinessbyte opened this issue Sep 29, 2019 · 1 comment
Open

魅族16x开启夜间模式,系统崩溃 #81

happinessbyte opened this issue Sep 29, 2019 · 1 comment

Comments

@happinessbyte
Copy link

No description provided.

@caiyishui
Copy link

这个问题可以直接在异常代码进行捕获处理
@OverRide
protected void dispatchDraw(Canvas canvas) {
// 由于在魅族夜间模式渲染会有问题,加异常捕获处理
try {
if (!isAnimationStarted || getWidth() <= 0 || getHeight() <= 0) {
super.dispatchDraw(canvas);
} else {
dispatchDrawShimmer(canvas);
}
}catch (Exception e){
// Log.i("")
}
}
本地依赖库替换成自己的修改后,这样至少不会crash

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