0

バンドルを介して ProgressDialog オブジェクトを渡したい状況に陥っています。

ProgressDialog PD =  new ProgressDialog();
PD.setMessage("My message");
PD.setCanceledOnTouchOutside(false);
PD.show();

// some other code

Bundle bundle = new Bundle();
bundle.putString("someVal1", textValue);
bundle.putInt("someVal2", integer_name);
bundle.put..... // pass PD here? 

ウェブを検索しましたが、有用な回答が見つかりませんでした。

4

1 に答える 1

2

ProgressDialog は複雑すぎて Bundle で渡すことができません。PD のパラメーター (タイトル、メッセージ、進行状況) を保存し、新しい ProgressDialog で値を復元する必要があります。

于 2015-01-16T12:20:18.413 に答える