I'm having some trouble with the MOVE TouchEvent on the 9530 (Storm). The events are all detected properly, but there is a huge lag on the device from when I actually move my finger around to when it responds to it.
I assume the touchEvent() method in Screen being called very frequently is what is causing the lag. Is there any way to make the touchEvent method get called less frequently? Or is this not even the problem?
Here is how my application is running. Could the way that it loops possibly be the cause?
Code:
public class Application extends UiApplication {
public MyClass myClass;
public static void main(String[] argv) {
Application app = new Application();
app.enterEventDispatcher();
}
public Application() {
this.enableKeyUpEvents(true);
myClass= new MyClass();
pushScreen(myClass);
myClass.initAppData();
Ui.getUiEngineInstance().setAcceptableDirections(Display.DIRECTION_NORTH);
new Thread(myClass).start();
}
} Code:
public class MyClass extends MainScreen implements Runnable
{
public void run() {
try {
while (running) {
mainLoop(); // This is my code is
}
} catch (Exception e) {
}
System.exit(0);
}
}