ProgressDialog in TabHost application ofandroid

江枫思渺然 提交于 2019-12-20 04:19:47

问题


I want to use the Progress Dailog in my application. I am facing one issue in doing it, after some RnD I came to know that it is not quite possible to create the progress Dialog I have the Activity Group Class for the TabHost in the application.

I have exactly the same scenario, I have the TabHost in my application and an ActivityGroup Class that has the TabHost Classes. So, when I try to create the Progress Dialog for the Class that is in the Activity Group Class I cannot create it. But if I try to create the Progress Dialog for the Class that is not in the Activity Group I can create it with no issues.

Is there any solutions now?


回答1:


I think the problem is with context of the progress dialog

Try giving the context of the dialog as getParent()

ProgressDialog.show(getParent(), " Loading...", "Please wait...", true, false);



来源:https://stackoverflow.com/questions/4756081/progressdialog-in-tabhost-application-ofandroid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!