如何显示对话框中onCreate方法?那是有可能的话,我试过,但我得到了泄露的窗口例外。任何人都可以建议我什么?
How to show Dialog in onCreate method ? Is that possible at all, I tried but I got leaked window exception. Can anyone suggest me anything ?
您可以使用ProgressDialog类与处理程序类的帮助。这样就可以达到你想要做什么。
you can use ProgressDialog Class with the Help of Handler Class. This way you can achieve what you want to do.
progDailog = ProgressDialog.show(loginAct,"Process ", "please wait....",true,true);
new Thread ( new Runnable()
{
public void run()
{
// your loading code goes here
}
}).start();
Handler progressHandler = new Handler()
{
public void handleMessage(Message msg1)
{
progDailog.dismiss();
}
}
上一篇:ActionBarSherlock堆积作用直板造型问题直板、造型、作用、问题
下一篇:java.lang.numberformatexception:无效的双:" "lang、java、QUOT、numberformatexception