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

©2019-2020 Toolsou All rights reserved,
Theory and formula derivation of univariate linear regression and multiple linear regression [RK3399][Android7.1] Learning notes DRM Driver development ( introduce )PowerShell Use in WebClient Download the file and get the download progress Centos7 lower mysql8.0 To install and change the initial password ;PHP Printout logpython in switch_to_alert Usage of Golang Array bisection , Array split , Array grouping Mybatis Mapping file Mapper.xml in # and $ The difference between python obtain excel A column or row of data C Language confession practice small program ( Suitable for beginners )