Skip to content Skip to sidebar Skip to footer

Speedometer Animation Android

I have 8 images which are placed circularly on the dial which resembles a speedometer with first image placed at the position which is similar to 0 and the last image on the positi

Solution 1:

Just initialize the hand position to max degree and in the moveHand() method setHandTarget(minDegrees) for anticlockwise rotation It worked for me.

For clockwise rotation just do the opposite.

Solution 2:

I have solved hand showing and moving inserting this in main activity:

View termometro = (View)findViewById(R.id.termometro);
    termometro.setLayerType(View.LAYER_TYPE_SOFTWARE, null);

It has to do with hardware acceleration

Post a Comment for "Speedometer Animation Android"