Nei*_*eil 0 eclipse android splash-screen
我正在 Eclipse 中为 Android 应用程序编码。我开发了一个闪屏,我需要在我的应用程序启动前显示 5 秒。怎么做?
Thread timer=new Thread()
{
public void run() {
try {
sleep(2000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
finally
{
Intent i=new Intent(SplashScreen.this,MainActivity.class);
finish();
startActivity(i);
}
}
};
timer.start();
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
11469 次 |
| 最近记录: |