Skip to content

空指针 #5

@nullkk

Description

@nullkk

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();
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions