我有一個主類A,從中我創建一個對象到類B擴展Asynctask。在B的doInBackground設置內容視圖A.現在,我要更新的TextView的,但它給在doINBackground中設置textview android
Caused by: android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
例外。我試圖在B中聲明setcontentview,但沒有用,請問誰能告訴如何編輯A中的Textview?
嘗試在AsyncTask的onPostExecute函數中執行此操作。 – Triode 2013-04-26 06:46:48