content: package powerup.systers.com.ui;
  
  import android.content.Intent;
  import android.os.Bundle;
  import android.os.Handler;
  import android.support.v7.app.AppCompatActivity;
  
  import powerup.systers.com.R;
  
  public class SplashActivity extends AppCompatActivity {
  
      private Handler handler;
      private Runnable runnable;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          // create a runnable which starts StartActivity with 1 sec delay
          handler = new Handler();
          runnable = new Runnable() {
              @Override
              public void run() {
                  Intent intent = new Intent(SplashActivity.this, StartActivity.class);
                  startActivity(intent);
                  overridePendingTransition(R.animator.fade_in, R.animator.fade_out);
                  finish();
              }
          };
          handler.postDelayed(runnable,1000);
      }
  
      @Override
      protected void onDestroy() {
          super.onDestroy();
          handler.removeCallbacks(runnable);
      }
  }
  