My question seems very simple but i can't seem to the logic right. Am trying to run methods from other classes using the UI thread. I could do this this simply by wrapping my methods like this
runOnUiThread(new Runnable() {
public void run() {
Log.d("UI thread", "I am the UI thread");
ui.myMethod("changetext");
}
});
but my goal is to have a class that wraps methods to be run on the UI thread as having runOnUiThread()
almost 5 times in a single class seems very untidy. Any pointers?