splashActivity Use of
import android.app.Activity; import android.content.Intent; import
android.content.SharedPreferences; import android.os.Bundle; import
android.os.Handler; * 1. Flash screen interface delay 2s Jump to " next " Interface handler 1. If it is the first time to enter the program , Jump to the boot interface 2.
If not for the first time , Jump to the main interface for the first time : Have you entered the main interface * for the first time : Whether it has been applied */ public class SplashActivity
extends Activity { // initialization sp Used to store whether it is the first time to enter the application or the first time to enter the program private SharedPreferences
sharedPreferences; @Override protected void onCreate(Bundle savedInstanceState)
{ super.onCreate(savedInstanceState); // Layout settings
setContentView(R.layout.activity_splash); // Is storage related the first keyword to enter the program Store locally
sharedPreferences = getSharedPreferences("config",MODE_PRIVATE);
Use a handle To delay the next page Handler handler = new Handler(); handler.postDelayed(new
Runnable() { @Override public void run() { // 1. If it is the first time to enter the program , Jump to the guidance interface boolean
isFirst = sharedPreferences.getBoolean("isFirst",true); if(isFirst){ Intent
intent = new Intent(SplashActivity.this,GuideActivity.class);
startActivity(intent); }else{ //2. If not for the first time , Jump to the main interface Intent intent = new
Intent(SplashActivity.this,MainActivity.class); startActivity(intent); }
finish(); } },2000); } }`
to configure
splashActivity This is the first page to enter in the manifest file , This is a fixed way of writing . In this process, version judgment is also required , See if the server has a new version for updating

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