Android:Operate UI controls in other thread,but
===

    beginButton.setOnClickListener(new Button.OnClickListener() {
		@Override
		public void onClick(View v) {
			PlayThread playThread = new PlayThread();
			Thread thread = new Thread(playThread);
			
			thread.start();
		}
    });
	
    public class PlayThread implements Runnable {
		@Override
		public void run() {
			beginButton.setClickable(false);
			pauseButton.setClickable(true);
			messageBool = true;
			int maxProgressBar = playProgressBar.getMax();
			int currentInt = playProgressBar.getProgress();
			
			for(; currentInt <= maxProgressBar; ++currentInt)
			{
				if(messageBool == false)
				{
					break;
				}
				playProgressBar.incrementProgressBy(1);
				try {
					Thread.sleep(400);
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
			}
			
			if(currentInt > maxProgressBar)
			{
				playProgressBar.setProgress(0);
				beginButton.setClickable(true);
				pauseButton.setClickable(false);
			}
		}
    };

Hi,everyone. Is there any problem about this code? I know we **cannot** operate the UI's controls in other threads except *UI thread* . But this code runs **OK**.So what's wrong or is there something I miss? 
Thanks in advance!