i) 写了一条灯片,显示一只ta子,能够从蓝色到洋上获得有关石灰的数据。 当数据变化时,即更换针头和其他图像 在屏幕上显示现有数值的意见。
轮值代码:
bMapRpm=bMapcanvasBackTacho.copy(bMapcanvasBackTacho.getConfig(), true);
canvasRpm.setBitmap(bMapRpm);
canvasRpm.save();
canvasRpm.rotate((float)Rpmdegree+(float)Rpmcurrentdegree,bMapRpm.getWidth()/2,bMapRpm.getHeight()/2);
canvasRpm.drawBitmap(bMapNadel,0,0,paint);
canvasRpm.restore();
bMapcanvasBackTacho is just a transparent background. bMapNadel is the bitmap of the needle. bMapRpm is the bitmap of the canvas to draw on
更新形象 观点一:
ivNadel.setImageBitmap(bMapRpm);
i tryed out what slows the app by commenting parts of the code out. after commenting the setImageBitmap() out the slow down disapeared.
谁知道如何更新形象 另一种方式或轮式的观念可能会改变,使其更快地工作?
thx =