Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #SplashScreen
- SharedPreferences sp = getSharedPreferences("DATALOGIN", MODE_PRIVATE);
- SharedPreferences.Editor e = sp.edit();
- boolean firstTime = sp.getBoolean("first_time", true);
- String id_user = sp.getString("id_user",""); #TAMBAHAN
- if (id_user!=""){ #TAMBAHAN
- startActivity(new Intent(Splashscreen.this, HomeActivity.class));
- }
- else if (firstTime) {
- startActivity(new Intent(Splashscreen.this, IntroActivity.class));
- } else {
- //setelah loading maka akan langsung berpindah ke home activity
- Intent home=new Intent(Splashscreen.this, MainActivity.class);
- startActivity(home);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement