mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2025-12-15 18:28:47 +00:00
Can now display splashscreen when first entering the app v.3
This commit is contained in:
parent
55d07f23e8
commit
addb8632d6
@ -31,8 +31,6 @@ import java.util.Random;
|
||||
public class MainActivity extends AppCompatActivity implements CreateListDialogFragment.OnNewListListener {
|
||||
private AppBarConfiguration mAppBarConfiguration;
|
||||
|
||||
private static final int SPLASH_SCREEN_TIME = 3000; //in milliseconds
|
||||
|
||||
public static AuthManager am = new AuthManager();
|
||||
|
||||
@Override
|
||||
@ -46,7 +44,7 @@ public class MainActivity extends AppCompatActivity implements CreateListDialogF
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
}, SPLASH_SCREEN_TIME);
|
||||
}, 1);
|
||||
|
||||
|
||||
//------------------------------Auth Testing---------------------------------------------//
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
package com.example.listify;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
@ -10,5 +12,14 @@ public class SplashActivity extends AppCompatActivity {
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_splashscreen);
|
||||
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Intent intent = new Intent(SplashActivity.this, MainActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
}, 3000);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user