public void handleMessage(Message msg) {
for(int i=0 ;i <2;i++){
TextView tv = (TextView) findViewById(mTrackSlotResource[i][TRACK_TEXTVIEW]);
pb = (ProgressBar) findViewById(mTrackSlotResource[i][TRACK_PROGRESSBAR]);
findViewById 相当于new ,在handleMessage里,控件每次都被初始化,pb.getProgress()值当然为0
for(int i=0 ;i <2;i++){
TextView tv = (TextView) findViewById(mTrackSlotResource[i][TRACK_TEXTVIEW]);
pb = (ProgressBar) findViewById(mTrackSlotResource[i][TRACK_PROGRESSBAR]);
findViewById 相当于new ,在handleMessage里,控件每次都被初始化,pb.getProgress()值当然为0
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货