Android ImageView: How can I get the current rotation angle?
问题 I rotate an image view to point an arrow in the desired direction. Before performing the next rotation (using RotateAnimation), how can I get the currently rotated angle of the ImageView? Thanks 回答1: You need store your previous rotation angle in some variable. 回答2: Save rotate angle: ImageView arrow = (ImageView) findViewById(R.id.arrow); float x = arrow.getPivotX(); float y = arrow.getPivotY(); RotateAnimation anim = new RotateAnimation(arrowRotateStartAngle, arrowRotateXAngle, arrow