Skip to main content

Transition Issue

1 reply [Last post]
Anonymous

Hi there,

if I add transition effects to a form and run the MDTIlet in the
emulator it exits instead of displaying the next form. Here is a code
snippet:

private Form setMainForm() {
mainForm = new Form("Mobile Guard");
mainForm.setLayout(new BorderLayout());
mainForm.addComponent(BorderLayout.CENTER,setMainList());
mainForm.addCommand(exitCommand);
mainForm.setCommandListener(this);

mainForm.setTransitionOutAnimator(CommonTransitions.createFade(400));

mainForm.setTransitionInAnimator(CommonTransitions.createFade(400));
return mainForm;
}

Is there something I'm doing wrong?

Stephan
[att1.html]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Shai Almog

Hi Stephan,
the code seems correct on basic review.

Everything should work as expected, usually when the emulator exits
immediately in my case its because I forgot one of the following:

1. Calling Display.init once.
2. Calling show() on a form
3. Defining the MIDlet in the project

If you have an exception or a way to reproduce the problem it would
help.

Thanks,
Shai.

> Hi there,
>
> if I add transition effects to a form and run the MDTIlet in the
> emulator it exits instead of displaying the next form. Here is a
> code snippet:
>
> private Form setMainForm() {
> mainForm = new Form("Mobile Guard");
> mainForm.setLayout(new BorderLayout());
> mainForm.addComponent(BorderLayout.CENTER,setMainList());
> mainForm.addCommand(exitCommand);
> mainForm.setCommandListener(this);
> mainForm.setTransitionOutAnimator
> (CommonTransitions.createFade(400));
> mainForm.setTransitionInAnimator
> (CommonTransitions.createFade(400));
> return mainForm;
> }
>
> Is there something I'm doing wrong?
>
> Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net