views:

47

answers:

2

Hello everyone! I try to learn java for android devices.. i have to create the update function. But still have one question: How????

in class root

public void update(){
 maindebug("update"); // This is my debug function
}

public void run(){
 while(isRunning){ // isRunning is a boolean variable
     SystemClock.sleep(100);
  update();
 }
}

and inside onCreate

run();

but it doesnt work :(

A: 

isRunning must evaluate to "true" for your while loop to happen.

Brad Hein
i know. that is "true"
kosmaks