2016-07-03 10:18:23 +00:00
|
|
|
package com.android_app.matan.ara.sagi.thesocialnotework;
|
|
|
|
|
|
|
|
import android.content.Intent;
|
|
|
|
import android.support.v7.app.AppCompatActivity;
|
|
|
|
import android.os.Bundle;
|
2016-07-03 12:55:10 +00:00
|
|
|
import android.util.Log;
|
|
|
|
import android.view.Window;
|
2016-07-03 10:18:23 +00:00
|
|
|
import android.widget.ImageView;
|
|
|
|
|
|
|
|
public class SplashActivity extends AppCompatActivity {
|
|
|
|
|
|
|
|
private ImageView appSplashScreen;
|
2016-07-03 12:55:10 +00:00
|
|
|
private int timerDelay = 3000;
|
|
|
|
private final String TAG = "Splash Screen Activity";
|
2016-07-03 10:18:23 +00:00
|
|
|
|
|
|
|
@Override
|
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
|
super.onCreate(savedInstanceState);
|
2016-07-03 12:55:10 +00:00
|
|
|
setContentView(R.layout.activity_splash);
|
2016-07-03 10:18:23 +00:00
|
|
|
|
2016-07-03 12:55:10 +00:00
|
|
|
Thread timerThread = new Thread(){
|
|
|
|
public void run(){
|
|
|
|
try{
|
|
|
|
sleep(timerDelay);
|
|
|
|
}catch(InterruptedException e){
|
|
|
|
e.printStackTrace();
|
|
|
|
}finally{
|
|
|
|
startActivity(new Intent(SplashActivity.this, LoginActivity.class));
|
|
|
|
finish();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
timerThread.start();
|
2016-07-03 10:18:23 +00:00
|
|
|
}
|
|
|
|
|
2016-07-03 12:55:10 +00:00
|
|
|
@Override
|
|
|
|
protected void onPause() {
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
super.onPause();
|
|
|
|
finish();
|
|
|
|
}
|
2016-07-03 10:18:23 +00:00
|
|
|
}
|