Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.a1.HudSeeker;
- import savemanager.com.DBSaveManager;
- import android.app.Activity;
- import android.content.Intent;
- import android.os.Bundle;
- import android.view.Window;
- public class Splash extends Activity {
- protected boolean _active = true;
- protected int _splashTime = 1000;
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- requestWindowFeature(Window.FEATURE_NO_TITLE);
- setContentView(R.layout.main);
- System.out.print("hello");
- DBSaveManager.initializeSharedPreferences(this);
- Settings loginInfoBean = new Settings();
- loginInfoBean.setlogin("false");
- DBSaveManager dbSaveManager = new DBSaveManager();
- dbSaveManager.saveLoginInfoBeanFirstTime(loginInfoBean);
- // thread for displaying the SplashScreen
- Thread splashTread = new Thread() {
- @Override
- public void run() {
- try {
- int waited = 0;
- while(_active && (waited < _splashTime)) {
- sleep(70);
- waited += 70;
- }
- finish();
- Intent intent=new Intent(Splash.this,HudSeekerHome.class);
- startActivity(intent);
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- };
- splashTread.start();
- }
- }
Add Comment
Please, Sign In to add comment