1

Why do I need a Handler object in this example?

view story
linux-howto

http://stackoverflow.com – public class ProgressBarTest extends Activity { private int progress; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.progress_bar); final Handler handler = new Handler(); progress = 0; final ProgressBar pb = (ProgressBar) findViewById(R.id.progressbar); new Thread(new Runnable() { public void run() { while (progress < 10) { try { Thread.sleep(500); } catch (Interru (HowTos)