Skip to main content

replace()

3 replies [Last post]
shai126
Offline
Joined: 2008-07-06

Calling myForm.replace( component1, component2, MySlideTransition ) - but the background color of component1 jumps from its correct color to white when the transition starts and stays white for the transition.. bug or something I'm doing wrong?
Thanks
S

Reply viewing options

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

Can you please supply source code to reproduce this problem?
Are you using a theme?

Thanks,
Shai.

> Calling myForm.replace( component1, component2, MySlideTransition )
> - but the background color of component1 jumps from its correct
> color to white when the transition starts and stays white for the
> transition.. bug or something I'm doing wrong?
> Thanks
> S
> [Message sent by forum member 'shai126' (shai126)]
>
> http://forums.java.net/jive/thread.jspa?messageID=285160
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>

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

shai126
Offline
Joined: 2008-07-06

This simple code replicates the problem:

import javax.microedition.midlet.MIDlet;
import com.sun.lwuit.Command;
import com.sun.lwuit.Display;
import com.sun.lwuit.Form;
import com.sun.lwuit.Label;
import com.sun.lwuit.animations.CommonTransitions;
import com.sun.lwuit.events.ActionEvent;
import com.sun.lwuit.events.ActionListener;

public class TestMIDlet extends MIDlet {

public void startApp() {

Display.init(this);

final Form f = new Form();
f.getStyle().setBgColor(0xFF0000); // red

final Label c1 = new Label("Label c1 changes to white!");
c1.getStyle().setBgColor(0x00FF00); // green

final Label c2 = new Label("Label c1 changes to white!");
c2.getStyle().setBgColor(0x0000FF); // blue

f.addComponent(c1);
f.addCommand(new Command("Press me"));

f.setCommandListener(new ActionListener() {

public void actionPerformed(ActionEvent evt) {
f.replace(c1, c2, CommonTransitions.createSlide(CommonTransitions.SLIDE_HORIZONTAL, true, 1000));
}

});

f.show();

}

public void pauseApp() {
}

public void destroyApp(boolean unconditional) {
}

}

Shai Almog

Thanks for this sample, I replicated this in the latest version and
the issue will be fixed for the next drop.

Shai.

> This simple code replicates the problem:
>

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