代码如下
package com.example.login_register; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import java.util.Timer; import java.util.TimerTask; public class Welcome extends AppCompatActivity { TimerTask timerTask; Timer timer=new Timer(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_welcome); timerTask=new TimerTask() { @Override public void run() { startActivity(new Intent(Welcome.this,Login.class)); } }; timer.schedule(timerTask,3000); } }
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)