package com.moral.screen.activity;
|
|
import android.app.Activity;
|
import android.content.Intent;
|
import android.os.Bundle;
|
|
import com.moral.screen.MainApp;
|
import com.moral.screen.R;
|
|
|
public class SplashActivity extends Activity implements Runnable {
|
|
@Override
|
protected void onCreate(Bundle savedInstanceState) {
|
super.onCreate(savedInstanceState);
|
setContentView(R.layout.ac_splash);
|
|
Thread delayThread = new Thread(this);
|
delayThread.start();
|
}
|
|
@Override
|
public void run() {
|
try {
|
Thread.sleep(1000);
|
} catch(InterruptedException e) {
|
e.printStackTrace();
|
}
|
if(MainApp.theApp.orgId==0){
|
Intent intent = new Intent(this, LoginActivity.class);
|
startActivity(intent);
|
}else{
|
Intent intent = new Intent(this, MapActivity.class);
|
startActivity(intent);
|
}
|
finish();
|
}
|
}
|