Go straight to the code

public class SplashActivity extends AppCompatActivity { private TextView tv;
privateRunnable mRunnable; @Override protected void onCreate(Bundle
savedInstanceState) {super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash); tv = (TextView) findViewById(R.id.tv
); MyCountDownTimer myCountDownTimer =new MyCountDownTimer(5000,1000); // 5000 representative
5 Enter the main page in seconds myCountDownTimer.start(); handler.postDelayed(mRunnable = new
Runnable() {@Override public void run() { Intent intent = new
Intent(SplashActivity.this,TwoActivity.class); startActivity(intent); finish();
} },5000); tv.setOnClickListener(new View.OnClickListener() { @Override public
voidonClick(View v) { Intent intent = new Intent(SplashActivity.this
,TwoActivity.class); startActivity(intent); finish(); if(mRunnable!=null){ //
Judge message handler Message if the message is not empty handler news remove Remove This is to prevent it from getting too far skip After that, it will appear in the next open Activity handler
.removeCallbacks(mRunnable); } } }); } private Handler handler = new Handler();
classMyCountDownTimer extends CountDownTimer{ public MyCountDownTimer(long
millisInFuture,long countDownInterval){ super
(millisInFuture,countDownInterval); }@Override public void onTick(long
millisUntilFinished) {tv.setText(" skip ("+millisUntilFinished /1000+")"); }
@Override public void onFinish() { tv.setText(" Skipping "); } } design sketch

Technology
©2019-2020 Toolsou All rights reserved,
It's unexpected Python Cherry tree (turtle The gorgeous style of Library ) Some East 14 Pay change 16 salary , Sincerity or routine ? Browser kernel ( understand )java Four functional interfaces ( a key , simple )HashMap Explain in detail html Writing about cherry trees , Writing about cherry trees os Simple use of module