用线程 public class Test extends Activity {
private final int SPLASH_DISPLAY_LENGHT = 10000; // 延迟10秒
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
Intent intent = new Intent(Test.this,
Your.class);
startActivity(intent);
Test.this.finish();
finish();
}
}, SPLASH_DISPLAY_LENGHT);
}
分享
时间: 2024-11-29 07:54:51