我仍在处理一段代码,我想使用按钮顺时针和逆时针旋转图像,我尝试了以下代码:
case (R.id.clock):
matrix.postRotate(90);
matrix.postRotate(getDegreesFromRadians(angle), mid.x, mid.y);
break;
case (R.id.anticlock):
float degrees = 0;
degrees = degrees-10;
matrix.postRotate(degrees);
break;
它正在工作但不是正确的方式,首先我必须按下按钮然后单击 imageview 来旋转图像。有什么帮助吗?
我在这里也问过这个问题Android Rotate image ontouch 但现在我想使用按钮