I have an application where you have an image and you can add different filters to it. I also have undo and redo buttons that work by having a picture of every change.so they can be undone. This worked perfectly in 2.3 but in 4.0 when I press undo the previous picture that is drawn looks the same as the very last frame as if it was being changed when the new picture was added.
So in 2.3 I had an array of pictures that always contained the original pictures that I put in. In 4.0 the pictures in the array change to match the last picture that I added. Here is some example code. newpixels is the new array of pixels for the image to be set to. public void addNewPicture(int[] newpixels) { Bitmap newbitmap = Bitmap.createBitmap(canvaswidth, canvasheight, mybitmap.getConfig()); newbitmap.setPixels(newpixels, 0, canvaswidth, 0, 0, canvaswidth, canvasheight); Picture picture = new Picture(); Canvas c= picture.beginRecording(canvaswidth, canvasheight); c.drawBitmap(newbitmap, 0, 0, null); picture.endRecording(); picturearray.add(picture); } -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en