私は私のMainActivity
Async
あるクラスを形成する私は「私はMainActivity
のものに第二のクラスのContext
を設定する必要がありますが、私はドンことを見てきたのTextView
を更新する問題を抱えていますこのシナリオでこれを達成する方法を知っています。私のアプリはこのように見えます。移入のTextView別のクラス
class RestOperation extends AsyncTask<String, Void, Void> {
@Override
protected Void doInBackground(String... params) {
//Java.net Http transaction happens here
}
@Override
protected void onPostExecute(Void result) {
//I wish to set the value of the TextView with the result here!
}
質問が不明です – Jas
これを確認してください:http://stackoverflow.com/questions/4591878/updating-progress-dialog-in-activity-from-asynctask –
申し訳ありません! OnPostExecuteで返された値を取得し、MAinActivityのTextViewに値(結果)を設定する必要があります。 – joebohen