[android]切换activity闪屏问题

游戏登陆切换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);

}

posted on 2014-05-04 19:10  ceylon_lei  阅读(957)  评论(0)    收藏  举报

导航