I wrote a litte application that should display a tachometer that receives rpm data ... via bluetooth. when the data changes, I rotate the needle and some other images to display the current values ββon the screen.
rotate code:
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 a bitmap image of a needle. bMapRpm is a canvas bitmap for drawing on
to update the image that I always call:
ivNadel.setImageBitmap(bMapRpm);
I tried that slows down the application by commenting out parts of the code. after commenting out setImageBitmap () from slow-fade.
Does anyone know how to update imageView in another way or can I change to make it work faster?
thanks =)