Threads and onDraw

Put your problem here if it does not fit any of the other categories.

Threads and onDraw

Postby multiplydivide » Wed Jun 02, 2010 4:12 pm

I am trying to delvelope a game and am having issues with the onDraw and a thread. Everything in the game occurrs in a class that extends view and implements ontouch, runnable..... the thread is in charge of keeping up with all the physics looping through an arraylist of objects and updating there posistions, deleting the objects if they are no longer on the screen and so on.... the drawing is done entirley in an over-ridden onDraw... The issue I have is when I have the thread running in a constant loop(asside from sleeping to produce my 30fps) the onDraw is never called and the top two menu bars, the ones that contain the battery level and signal and such do not go awway... when i comment out the threads loop and make all the physics occur in the onDraw(which does not produce anything near what I want just did it while debugging to see if all my methods where working) the drawing and the physics works.... any ideas??? anyone else have expierience or issues with threads and onDraw???
multiplydivide
Developer
Developer
 
Posts: 34
Joined: Wed Apr 28, 2010 2:09 am

Top

Re: Threads and onDraw

Postby sanyiii » Thu Jun 03, 2010 7:19 am

You should use SufaceView.
sanyiii
Developer
Developer
 
Posts: 42
Joined: Wed Jun 10, 2009 9:58 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 13 guests