Titanium appcelerator framework: Scrollview content size can't be set with device orientation changes
I have posted my question to developer.appcelerator.com.
http://developer.appcelerator.com/question/124915/device-orientation-does-not-reflect-scrollview-content-resizing
=======================================================================
I have scrollview resize problem when device orientation changed.
Check the code which I use for scrollView and orientation:
http://pastie.org/2453412
In the above function 'libraryView' is the window which we'll create calling the function and open. In the above function we add few titles and views in scrollview, so, scrollview gets expanded. We have also maintained orientation function, so, on device orientation change, scrollview's content height/width can be set. Please check the orientation function carefully.
Please see here as I state the problem: When I open the window, it displays perfect. Scrolls only vertically because there's no horizontal scroll. And when I change orientation to Landscape, then also it displays perfect, only vertical scroll, no horizontal. But when I change back 开发者_JAVA百科to Portrait orientation mode, scrollview displays both vertical as well as horizontal scrolls. Even I have manually set the content width to 320, It displays same. I don't know how horizontal scroll is being enabled.
Can someone please suggest me any solution..?
Ti.Gesture.AddEventListener('orientationchange') is applied globally on the full application.
精彩评论