Android Fragments and Separate Threads
A Handler
would be an obvious choice.
final Runnable changeView = new Runnable(){ public void run() { methodIWantHere(); handler.postDelayed(this, timeout); }};handler.postDelayed(changeView, timeout);
Try to execute your piece of code by using
runOnUiThread(Runnable action).