0
I’m creating a splash but this splach is stopping my App, it works for a few seconds after automatically closes my App stops working and no longer opens.
public class Splash extends AppCompatActivity {
private final int SPLASH_DISPLAY_LENGTH = 3000;
@Override
protected void onCreate(Bundle savedInstanceState) {
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
ActionBar actionBar = getSupportActionBar();
if(actionBar != null){
actionBar.hide();
}
new Handler().postDelayed(new Runnable(){
@Override
public void run(){
Intent startActivityIntent = new Intent(Splash.this, AuthUIActivity.class);
startActivity(startActivityIntent);
Splash.this.finish();
}
}, SPLASH_DISPLAY_LENGTH);
}
}
Log in when the app closes.
– Vitor Ramos
could be more specific because I didn’t understand it very well
– jonh
When you are running the application, in Android Studio shows the log of what is happening in the 'Run' tab, when the application stops working appears the error in this log.
– Vitor Ramos