Titanium appcelerator框架:滚动视图内容大小无法随着设备方向的变化而设置
我已将我的问题发布到developer.appcelerator.com。
=================================================== =====================
当设备方向改变时,我遇到滚动视图调整大小问题。
检查我用于滚动视图和方向的代码:
在上述函数中' “libraryView”是我们将调用该函数创建并打开的窗口。在上面的函数中,我们在滚动视图中添加了一些标题和视图,因此滚动视图得到了扩展。我们还维护了方向功能,因此,在设备方向改变时,可以设置滚动视图的内容高度/宽度。请仔细检查定向功能。
请参阅此处,因为我陈述了问题:当我打开窗口时,它显示完美。仅垂直滚动,因为没有水平滚动。当我将方向更改为横向时,它也显示完美,只有垂直滚动,没有水平滚动。但是当我改回纵向模式时,滚动视图同时显示垂直和水平滚动。即使我手动将内容宽度设置为 320,它的显示也是一样的。我不知道如何启用水平滚动。
有人可以建议我任何解决方案吗..?
I have posted my question to developer.appcelerator.com.
=======================================================================
I have scrollview resize problem when device orientation changed.
Check the code which I use for scrollView and orientation:
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 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..?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Ti.Gesture.AddEventListener('orientationchange') 在整个应用程序中全局应用。
Ti.Gesture.AddEventListener('orientationchange') is applied globally on the full application.