Necesito rotar un ImageView
a 180 grados de golpe
Ahora uso la siguiente funcion, que define una animación que dure 0 segundos
private void rotate(ImageView iv, float degree) {
final RotateAnimation rotateAnim = new RotateAnimation(0.0f, degree,
RotateAnimation.RELATIVE_TO_SELF, 0.5f,
RotateAnimation.RELATIVE_TO_SELF, 0.5f);
rotateAnim.setDuration(0);
rotateAnim.setFillAfter(true);
iv.startAnimation(rotateAnim);
}
para rotar a 180º rotate(imagen,180);
¿Me pregunto si existe una forma más eficiente? sin tener que recurrir al sistema de animación