Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
6002CEM_8918189/app/src/main/java/com/example/booksharing21/SplashActivity.java
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
32 lines (22 sloc)
781 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.booksharing21; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.os.Handler; | |
import androidx.appcompat.app.AppCompatActivity; | |
public class SplashActivity extends AppCompatActivity { | |
private static int SPLASH_TIME_OUT = 4000; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_splash); | |
// Splash page | |
new Handler().postDelayed(new Runnable() { | |
@Override | |
public void run() { | |
Intent homeIntent = new Intent(SplashActivity.this,MainActivity.class); | |
startActivity(homeIntent); | |
finish(); | |
} | |
}, SPLASH_TIME_OUT); | |
} | |
} |