BlackBerry - 在进行布局更改时防止屏幕重绘,然后立即重绘
我在屏幕上有一些管理器中的管理器(主要是 VerticalFieldManagers)。
在一次活动中,我需要更改屏幕上某些管理器的布局。这包括向 VerticalFieldManager 添加/删除字段。
最终,在重新布局时出现了相当明显的闪烁(目前正在模拟器和 Torch 设备上进行测试)。
我有一种感觉,我读过一种防止屏幕重绘的方法,这将使我能够一次批处理所有更新,然后只调用 1 次重绘。这可能是非常简单的事情,但我找不到 atm,&这里看不到任何相关问题。
- 进行此类更改以防止/的 BB 技巧是什么? 最小化屏幕闪烁?
I have a few managers within managers (mostly VerticalFieldManagers) on a screen.
On an event, I need to change the layout of some managers on the screen. This includes adding/deleting fields to/from VerticalFieldManagers.
Ultimately there is quite a noticable flicker (currently testing on emulator & a Torch device) on this re-laying out.
I have a feeling I've read about a way to prevent the screen from redrawing, which would enable me to batch all the updates at once, and then just call 1 redraw. It might be something really simple, but I can't find it atm, & can not see any related questions here.
- What is the BB trick for doing changes like this to prevent /
minimize screen flicker?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 UiApplication.suspendPainting(boolean),参数为
true
暂停,false
恢复。You can suspend and resume screen painting by using UiApplication.suspendPainting(boolean) with the parameter being
true
to suspend, andfalse
to resume.