[android]切换activity闪屏问题

时间:2014-05-05 10:38:34   收藏:0   阅读:875

游戏登陆切换activity时,总是出现闪屏现象,解决方案,暂停线程100毫秒调用startActivity,闪屏解决,代码:

@Override

public void startActivity(final Intent intent) {

 

new Thread() {

 

@SuppressWarnings("static-access")

public void run() {

 

try {

 

Thread.currentThread().sleep(100);

 

} catch (InterruptedException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

 

myStartActivity(intent);

};

}.start();

}

 

public void myStartActivity(Intent intent) {

 

super.startActivity(intent);

}

[android]切换activity闪屏问题,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!