Look at the various branches of ThreadWithRunnables (and note that you have to resync gradle when you switch branch):
- The master branch contains an implementation using Thread, and the Looper. This is what I was trying to do during class.
- The eventbus branch contains a solution to the same problem, implemented using the EventBus library. Notice how much cleaner the code is.
There is also an implementation using AsyncTask available.
There is also the ThreadTutorial from Shobit that we will discuss next time.