如何摆脱黑屏 [英] How to get rid of black screen

查看:182
本文介绍了如何摆脱黑屏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

米Goutham米采用Android 2.2,我有一个问题,可能是你们帮我计算出来。
我有一个认证画面中时,它记录米正在采取这样的时间来加载,然后将其切换到黑屏,然后转到实际工作mainscreen。我怎么能作出这样的黑屏白.. plz帮助我的家伙...

m Goutham m using android 2.2 i have a problem may be you guys help me in figuring it out. i have a authentication screen when m logging in it is taking so time to load and then it switches to a black screen and then it goes to the actuall mainscreen. how can i make that black screen to white.. plz help me guys...

感谢名单提前,
Goutham

Thanx in Advance, Goutham

推荐答案

在你的第二活动(即其中U登录后加载页面)创建

Inside your 2nd activity( i.e the page which u load after the login) create

private class LoginTask extends AsyncTask<String, Void, Boolean> {

@Override
    protected void onPreExecute() {
        super.onPreExecute();
        // show a progress dialog indicating that its loading
    }

    @Override
    protected Boolean doInBackground(String... params) {
            // give your code that has to be loaded.
    }

    @Override
    protected void onPostExecute(Boolean success) {
        super.onPostExecute(success);
        //dismiss your progress dialog
    }
}

和调用这个LoginTask在你的第二活动你的onCreate功能:

And call this LoginTask in your onCreate function of your 2nd activity as:

new LoginTask().execute();

希望这可以帮助您解决问题...

Hope this may solve your issue...

这篇关于如何摆脱黑屏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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