Java tutorial
//package com.java2s; import android.os.Handler; import android.widget.TextView; public class Main { static void updateTextView(Handler handler, final TextView tv, final String text) { handler.post(new Runnable() { public void run() { tv.setText(text); } }); } }