Сбой приложения с «Called From Wrong Thread Exception»

Я добавил эту часть кода в свой метод onCreate(), и это приводит к сбою моего приложения. нужна помощь.

LOGCAT:

android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread 
that created a view hierarchy can touch its views.

КОД:

final TextView timerDisplayPanel = (TextView) findViewById(R.id.textView2);

    Timer t = new Timer();
    t.schedule(new TimerTask(){
        public void run(){
            timerInt++;
            Log.d("timer", "timer");
            timerDisplayPanel.setText("Time ="+ timerInt +"Sec");
        }
    },10, 1000);
12
задан GAMA 16 June 2012 в 11:25
поделиться