0

I am stuck in a situation where I want to pass a ProgressDialog object through bundle.

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? 

I have searched the web but could not find any useful answers.

4

1 回答 1

2

ProgressDialog 太复杂,无法通过 Bundle 传递它。您应该保存 PD 的参数(标题、消息、进度)并在新的 ProgressDialog 中恢复这些值。

于 2015-01-16T12:20:18.413 回答