package com.muskmelon.splash;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
public class SplashActivity0 extends Activity
{
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.shan);
new Handler().postDelayed(new Runnable()
{
public void run()
{
Intent intent = new Intent(SplashActivity0.this,SplashActivity.class); //从启动动画ui跳转到主ui
startActivity(intent);
SplashActivity0.this.finish(); // 结束启动动画界面
}
}, 3000); //启动动画持续3秒钟
}
}
package com.muskmelon.splash;
import android.app.Activity;
import android.os.Bundle;
public class SplashActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}