1

Possible Duplicate:
Drawing mirrored bitmaps in android

I'm working on an iOS- and Android-app with Titanium Mobile and have the following problem: I want to mirror an ImageView and created the following code for that:

var transformation = Ti.UI.create2DMatrix();
transformation = transformation.scale(-1, 1);
imageView.transform = transformation;

This works fine on iOS, but on Android the image will not be shown. What else can I do to mirror an image with Titanium on Android? Or am I doing something wrong with my actual code?

Thanks a lot for any answer! Thomas

Community
  • 1
  • 1
  • http://stackoverflow.com/questions/7925278/drawing-mirrored-bitmaps-in-android, http://stackoverflow.com/questions/8552298/how-to-mirror-an-image-file-2-2 – user1378730 May 22 '12 at 10:20

1 Answers1

2

Now I can answer the question by myself. I've done some further tests and the solution - in the end - is quiet simple. The ImageView will be moved to the left as far as the mirroring goes (in my case 320px). Setting the "left"-parameter of the ImageView to the accordingly value shows the ImageView on the screen. So it was created correctly, but not visible on the screen.

Perhaps this helps other users who have the same problem with Titanium, because in iOS the left-value has not to been set to a new value; everything works fine with my posted code above.