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,
Thread.getContextClassLoader And Thread.getClassLoader() difference ( Essence )2020 year 7 month 15 day Wechat applet template Use of Conflict statement (conflicting declaration) solve Python read Excel A column | Transfer deposit jsonjava Compile time and runtime exceptions in python3 Read the file and specify a few lines , And write to another file ToastUtils Use of Huawei Mate 40 Pro+ 5G exposure : Leica film lens , Ceramic body python Dynamic programming for single source shortest path ELementUI select Multi select drop-down box to get all properties of the selected item