Ti.UI.iPad.SplitWindow 更新布局或在方向更改时隐藏/显示详细视图?
使用 Ti.UI.iPad.SplitWindow 更新 detailView
的最佳(看起来最干净)方法是什么?
我能想到的选项是更改 detailView
事件中元素的位置或 show()/hide()
与 open()/close()
在 orientationchange
事件上。我知道在 iPad 上使用本机 UI 组件应该动态更新到 iPad 的布局宽度/高度,但在我的情况下,每个 detailView
上的内容将在 上更新其子对象位置方向改变。我只是想从你的所有经历中获得最顺利的结果。即使我必须构建自定义动画,我也只想从头开始正确,所以目前还没有代码存在。因此没有包括在内。
我希望这不是重复的,因为我在提问之前进行了搜索,但我找不到关于这个主题的基于钛的问题。 可能但仍然与我的不同我问。
When using the Ti.UI.iPad.SplitWindow what is the best(cleanest looking) way to update the detailView
?
The options I can think of are changing the positions of elements in the detailView
event or to show()/hide()
vs open()/close()
on an orientationchange
event. I know that using the native UI components on the iPad should dynamically update to the layout width/height of the iPad but in my case the content on each detailView
will have it's child objects positions updated on orientationchange
. I'm just trying to get the smoothest from your all experiences. Even if I have to build custom animations I just want to start this correct from the beginning so no current code exists yet. Thus none included.
I'm hoping this isn't a duplicate as I searched before I ask but there are no Titanium based questions on this topic I can find. Possible but still different to what I'm asking.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通过最少的改变来提供最流畅的体验。我不知道你想要什么动画,但我会鼓励你保持简单。
下面是我最近构建的 iPad 应用程序中方向更改的快速示例。我在布局视图中有一堆图像:“水平”。由于不错的错误,图像会自动换行。当用户重新定向设备时,我对视图的宽度进行动画处理,并且图像会自动且动画地重新排列。
我还遇到过一些大公司的客户,每当用户重新调整设备方向时,他们就会对布局进行非常复杂的更改。这导致了一个非常令人不满意的应用程序,需要 10-20 秒才能重新定位。我们做了很多优化,并对他们的代码和底层框架进行了很多改进,但问题的核心是复杂的设计。
花点时间考虑每次用户重新定向时是否真的需要复杂的更改,以及您为用户提供了多少好处。还要考虑向用户(不仅仅是设备)呈现新 UI 的成本。
除此之外,除非您对此进行一些实验,否则您可能不会得到太多答案。如果您回来时附带一些代码和一些问题,我可以重新制定我的答案以更好地查明您的情况。
希望这有帮助! -道森
The smoothest experience will be delivered by changing the least. I don't know what animations you are envisioning, but I would nudge you towards keeping it simple.
Here's a quick example of an orientation change in an iPad app I built recently. I had a bunch of images in a view with layout: 'horizontal'. Due to a nice bug, the images wrapped automatically. When the user reoriented the device, I animated the width of the view, and the images automatically and animatedly resorted themselves.
I've also had some clients at a large corporation get their hearts set on really complicated changes to the layout whenever the user reoriented the device. This resulted in a really unsatisfactory app that took 10-20 seconds to reorient. We made a lot of optimizations, and a lot of improvements in both their code and the underlying framework, but the heart of the problem was the complex design.
Take the time to consider if you really need complicated changes every time the user reorients, and how much benefit you are offering to your users. Also consider the cost to the user (not just to the device) of presenting them with a new UI.
Past that, you're probably not going to get too many answers until you put some experimentation in to this. If you come back with some code and some questions to go along with it, I can reformulate my answer to better pinpoint your situation.
Hope this helps! -Dawson