image aspect ratio on orientation change
Hi,
I built a photo gallery using a ScrollableView containing ImageViews. When orientation changes, I need to resize all ImageViews to fit the screen.
I tried to use setWidth/setHeight in an "orientationchange" event listener but it has no effect unless I call setImage again. But then I ran into performance problems, sometimes the app crashes.
Anybody an idea what's the best approach?
2 Answers
-
Check the screenCap.height and screenCap.Width and adjust view accordingly
-
Ok I got same issue, answer is very simple, in the scrollable set width and height to '100%' var scrollable = Ti.UI.crateScrollableView({width:'100%', height:'100%'}); this will make the trick