I love the convenience of the Handler class; I can easily queue messages and even delay messages. However, all the code runs on the UI thread which is causing stuttering of the animation.
Is there a class, like Handler, that doesn’t run on the UI thread ?
You could always use a
HandlerThread. I do not have a simple example of this handy, unfortunately.Personally, I tend to use
java.util.concurrentclasses directly for things that do not involve the main application thread (e.g.,LinkedBlockingQueue,ExecutorService).