Re: [android-developers] Question about SurfaceView and Threads

2012-09-11 Thread Kostya Vasilyev
Because you don't always have an Activity easily accessible? Besides: >> 1. public final void runOnUiThread(Runnable action) { 2. if (Thread.currentThread() != mUiThread) { 3. mHandler.post(action); 4. } else { 5. action.run(); 6.

Re: [android-developers] Question about SurfaceView and Threads

2012-09-11 Thread bob
runOnUiThread? Why have I been using Handler.post this whole time? On Monday, September 10, 2012 3:41:53 AM UTC-5, Harri Smått wrote: > > > On Sep 10, 2012 12:04 AM, "Edvinas Kilbauskas" > > > wrote: > > I heard that android doesn't support plain old Java Threads. > > That's not true. Android

Re: [android-developers] Question about SurfaceView and Threads

2012-09-10 Thread Harri Smått
On Sep 10, 2012 12:04 AM, "Edvinas Kilbauskas" wrote: > I heard that android doesn't support plain old Java Threads. That's not true. Android supports basic Java Threads and there's no reason for not to use them when appropriate. But the thing is, you can not alter UI components outside of UI Thr