List of usage examples for android.widget ImageView getRotation
@ViewDebug.ExportedProperty(category = "drawing") public float getRotation()
From source file:Main.java
public static void rotate(ImageView iv, boolean ivDownFlag) { float startRotation = iv.getRotation(); float endRotation = ivDownFlag ? startRotation + 180 : startRotation - 180; ObjectAnimator.ofFloat(iv, "rotation", startRotation, endRotation).setDuration(500).start(); }