[Interest] Rotation issue on Android device

Jason H jhihn at gmx.com
Tue Dec 9 22:38:12 CET 2014

I have a screen that I am trying to handle rotation on. Initially it is an image. The user draws a box, and I convert the box to relative image coordinates  (0-1, 0-1).

Then I change the window size on the desktop, and the box is stable. It says in place relative to the image. (I hook onWidthChanged and onHeightChanged)

When I move to mobile, and rotate the screen the box takes a new, incorrect position. When it is rotated back it takes yet another incorrect position. The incorrect position is many pixels above where it should be. I cannot explain why the box is moving vertically, but after the 3rd position of the box, it is stable, always moving between position 2 and position 3. It doesn't otherwise deform.

I am thinking I'm doing the layout while value are changing and I'm not fully getting the new position. How should I handle rotations to this rect?


More information about the Interest mailing list