开发者

BlackBerry Menu activates Transition

When the user click something in my App it activates the Menu, which pops up on screen. However this Menu also activates a transition, which I can't seem to turn off. So the screen does some weird sliding thing which looks really bad. I have set some global transitions, and this is the only place they are causing a problem.

Is there a way I can access the screen that the default menu pushes so I can se开发者_如何学JAVAt a new empty transition? Or is there any other way to control the transition without going back and turning off the global transitions and setting them for every individual page?

Thanks


When using a global sliding transition (TransitionContext.TRANSITION_SLIDE), make sure to set the style to TransitionContext.STYLE_OVER, since the default is TransitionContext.STYLE_PUSH which causes the ugly screen slide when opening the menu.

Up-sliding menu example would look like:

TransitionContext transition = new TransitionContext(TransitionContext.TRANSITION_SLIDE);
transition.setIntAttribute(TransitionContext.ATTR_DURATION, 150);
transition.setIntAttribute(TransitionContext.ATTR_DIRECTION,  TransitionContext.DIRECTION_UP);
transition.setIntAttribute(TransitionContext.ATTR_STYLE, TransitionContext.STYLE_OVER);
Ui.getUiEngineInstance().setTransition(null, null, UiEngineInstance.TRIGGER_PUSH, transition);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜