Image.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
Trace(array);
.....
int print_prog;
int total_pixels = mPixels_printedpixelcomparison.capacity();
**print_prog** = (printedpixel/total_pixels)*100;
printProgress.setProgress(**print_prog**);
......
}
private Bitmap Trace(int[] imageArray)
{
.....
printedpixel +=100;
.....
}
在上面的代码中print_prog始终为零,并且我的进度条也没有变化(它只是空白)导致零的原因......有人可以帮我解决这个问题吗?