0
在我的應用程序中,我點擊一個按鈕來旋轉圖像。現在,當我將圖像傳遞給另一個活動時,我不想放鬆圖像的旋轉角度。如何將ImageView中的旋轉圖像傳遞給另一個活動?
這是我如何旋轉圖像。
在按鈕的的onclick「旋轉」
btn_rotate.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
rotateImage(true);
}
});
public void rotateImage(boolean rotate) {
RotateAnimation animation = null;
if (rotate) {
animation = new RotateAnimation(rotation, rotation + 90,
picview.getWidth()/2, picview.getHeight()/2);
rotation += 90;
rotation %= 360;
} else {
animation = new RotateAnimation(0, rotation,
picview.getWidth()/2, picview.getHeight()/2);
}
animation.setDuration(0);
animation.setFillAfter(true);
animation.setInterpolator(new LinearInterpolator());
picview.startAnimation(animation);
}
我通過旋轉角度:
send_image.putExtra("rotation_angle", rotation);
但在接收活動如何申請的rotation_angle上的形象呢?有人能指導我嗎?
謝謝。
animarions用於動畫的東西,你與他們做的是用眼過度 – pskink