PDA

View Full Version : Beginner Orientationchange question



bcolflesh
19 Dec 2011, 11:20 AM
I have a simple carousel with images for items - on orientationchange, if landscape, I want to display two images instead of one. Either by changing the items of the existing carousel, or by show/hide another carousel with the "2 image" item layout - Can someone point me to some simple example code of either approach?

mitchellsimoens
19 Dec 2011, 11:25 AM
Sencha Touch 1 or Sencha Touch 2?

bcolflesh
19 Dec 2011, 11:27 AM
Sencha Touch 1.1.1

mitchellsimoens
19 Dec 2011, 11:29 AM
If you set monitorOrientation to true, the orientationchange event should get fired and you can listen to it to do what you wish.

bcolflesh
19 Dec 2011, 11:33 AM
Correct, I understand that part completely, perhaps I am doing a poor job of explaining this - I need a code example of switching the current carousel items to different items on orientationchange - ie: 1 image in portrait, then change to displaying 2 images in landscape.