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

空指针 #5

Open
nullkk opened this issue Jan 9, 2018 · 0 comments
Open

空指针 #5

nullkk opened this issue Jan 9, 2018 · 0 comments

Comments

@nullkk
Copy link

nullkk commented Jan 9, 2018

java.lang.InterruptedException
01-09 17:27:03.175 5795-7256/com.gdkoala.finace.homework.teacher W/System.err: at java.lang.Thread.sleep(Native Method)
01-09 17:27:03.175 5795-7256/com.gdkoala.finace.homework.teacher W/System.err: at java.lang.Thread.sleep(Thread.java:370)
01-09 17:27:03.175 5795-7256/com.gdkoala.finace.homework.teacher W/System.err: at java.lang.Thread.sleep(Thread.java:312)
01-09 17:27:03.175 5795-7256/com.gdkoala.finace.homework.teacher W/System.err: at com.gdkoala.finace.homework.teacher.view.FlikerProgressBar.run(FlikerProgressBar.java:318)
01-09 17:27:03.175 5795-7256/com.gdkoala.finace.homework.teacher W/System.err: at java.lang.Thread.run(Thread.java:760)

对应此段代码

FlikerProgressBar.class

@OverRide
public void run() {
int width = flikerBitmap.getWidth();
try {
while (!isStop && !thread.isInterrupted()) {
flickerLeft += dp2px(5);
float progressWidth = (progress / maxProgress) * getMeasuredWidth();
if (flickerLeft >= progressWidth) {
flickerLeft = -width;
}
postInvalidate();
Thread.sleep(20);
}
} catch (InterruptedException e) {
e.printStackTrace();
}
}

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