Search This Blog

Sunday, 25 March 2012

How to use animation while switching from one screen to another

Hello friends, So nothing to explain,its just how to use animation in blackberry... what you need to do is use this code before pushing a screen... Code: TransitionContext transition = new TransitionContext(TransitionContext.TRANSITION_FADE); transition.setIntAttribute(TransitionContext.ATTR_DURATION,500); transition.setIntAttribute(TransitionContext.ATTR_DIRECTION,TransitionContext.DIRECTION_DOWN); transition.setIntAttribute(TransitionContext.ATTR_STYLE,TransitionContext.STYLE_PUSH); UiEngineInstance engine = Ui.getUiEngineInstance(); engine.setTransition(,,UiEngineInstance.TRIGGER_PUSH, transition); UiApplication.getUiApplication().popScreen(); UiApplication.getUiApplication().pushScreen();

No comments:

Post a Comment