问题显示ProgressDialog内嵌套的标签活动嵌套、标签、问题、ProgressDialog

2023-09-05 09:37:30 作者:落ㄖdě余晖

我有嵌套的标签活动。

TabMain(TabHost)与我有ChildTab(另一个TabHost)等2活动。

TabMain (TabHost) with that i have ChildTab (another TabHost) and other 2 Activities.

我也能显示进度对话框中的其他2的活动。

I can able to show Progress Dialog in that other 2 activity.

但随着ChildTab TabActivity我加5活动

But with in ChildTab TabActivity I add 5 Activities

在这我可以能够显示progressDialog。

in that i can able to Show progressDialog.

我收到以下错误。

ERROR / AndroidRuntime(339):android.view.WindowManager $ BadTokenException:产生的原因无法添加窗口 - 令牌android.app.LocalActivityManager$LocalActivityRecord@43d304f0无效;在您的活动运行?

ERROR/AndroidRuntime(339): Caused by: android.view.WindowManager$BadTokenException: Unable to add window -- token android.app.LocalActivityManager$LocalActivityRecord@43d304f0 is not valid; is your activity running?

推荐答案

尝试 ProgressDialog progressDialog = ProgressDialog.show(的getParent(),载入中...,请稍候...) ;

...我认为这会使事情worinkg。

...I think it will make things worinkg .