rotate image to occupy full screen in landscape more

Hi all

Need some help. I am working on an app where I have some images and text displayed. My app is in portriat mode. Now when user clicks on an image the image is shown in landscape mode occupying the full screen and all other content is hidden. Image has a cross button on it to close the full screen and go back to normal mode.

Now I need help specially on rotating the image to be displayed in landscape mode occupying the full screen.
I will be thankful for help.

Thanks [import]uid: 126619 topic_id: 33052 reply_id: 333052[/import]

I’ve a widget for that at
https://github.com/open768/library/blob/master/widget/background.lua

I use separate images as portrait and landscape have different proportions meaning if 1 image was used for both, your have to scale up the image when the screen rotates so as to use the whole screen.

essentially what you have to do is add a listener which does the work of rotating and scaling the image.
[lua]Runtime:addEventListener( “orientation”, listener ) [/lua]
[import]uid: 74338 topic_id: 33052 reply_id: 131314[/import]

I’ve a widget for that at
https://github.com/open768/library/blob/master/widget/background.lua

I use separate images as portrait and landscape have different proportions meaning if 1 image was used for both, your have to scale up the image when the screen rotates so as to use the whole screen.

essentially what you have to do is add a listener which does the work of rotating and scaling the image.
[lua]Runtime:addEventListener( “orientation”, listener ) [/lua]
[import]uid: 74338 topic_id: 33052 reply_id: 131314[/import]