ProgressDialog在TabHost应用ofandroid [英] ProgressDialog in TabHost application ofandroid

查看:123
本文介绍了ProgressDialog在TabHost应用ofandroid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要使用的进度Dailog在我的应用程序。我在做它面临一个问题,有些RND后,我才知道,这是不太可能创造进度对话框我的活动组级的TabHost应用程序中。

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.

我有完全一样的情况下,我有TabHost在我的应用程序和的ActivityGroup类具有TabHost类。所以,当我尝试创建进度对话框的类是在活动组类,我不能创建它。但是,如果我尝试创建进度对话框的类不在活动组,我可以没有问题创造它。

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?

推荐答案

我认为这个问题是与进度对话框的情况下

I think the problem is with context of the progress dialog

先给对话的上下文中的getParent()

Try giving the context of the dialog as getParent()

ProgressDialog.show(的getParent(),载入中...,请稍候...,真,假);

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

这篇关于ProgressDialog在TabHost应用ofandroid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆