活动之间的黑色画面的切换 [英] black screen switching between activity

查看:79
本文介绍了活动之间的黑色画面的切换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用下面code从我的活动再掀之一

I am using below code from one of my activity to start another

Intent viewIntent = new Intent(getApplicationContext (), landingPage.class);
Bundle b = new Bundle();
b.putString("ApplicationName", a_Bean.getApplicationName());
if (landingPage.getInstanceCount() < 1)
    bp.landingPage_ProgressDialog = ProgressDialog.show(ViewAllApp.this, "Please wait...", "Retrieving data...", true, false);
viewIntent.putExtras(b);
viewIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivityForResult(viewIntent,10);
Thread background = new Thread(new Runnable() {
    public void run() {
        Progresshandler.sendMessage(handler.obtainMessage());//finishes progressDialog
}});
background.start();

但startactivity后显示黑屏和放大器;然后显示新的活动。 我可以progressdialog同时显示黑屏?要显示

but after startactivity it shows a black screen & then displays new activity. Can I make progressdialog to be shown while the black screen is displayed??

推荐答案

我解决了上述问题,由被称为类(即我landingPage.class)给调用者类中删除的DataLoader(即加载数据从互联网即方法)。

I resolved above issue by removing DataLoader(i.e. methods that load data from Internet) from called class(i.e. my landingPage.class) to the caller class.

这篇关于活动之间的黑色画面的切换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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