I am making one application on mobile using Lwuit/java-me. I am having the problem in implementing an advertise/information form between the transaction of two forms. the advertise/information screen should stay for 5 seconds only and then the next subsequent screen should display automatically.
Asked
Active
Viewed 148 times
2 Answers
2
You must show a Dialog
between Forms
. Put to this Dialog
a timeout using setTimeout
method, and it will dispose automatically

Mun0n
- 4,438
- 4
- 28
- 46
2
Did you use the GUI builder? How are you showing forms?
A simple way is to create an Ad Form with all the details and just show it instead of showing the next form (give it the actual next form when constructing it).
Within the Ad form register an animation that measures the 5 seconds to move to the next form:
adForm.registerAnimation(new Animation() {
public void paint(...) {
// empty
}
public boolean animate() {
if(fiveSecondsPasssed) {
showNextForm();
}
return false;
}
});

Shai Almog
- 51,749
- 5
- 35
- 65