Splash.java 958 B

12345678910111213141516171819202122232425262728293031
  1. package com.chinaappsremover.ui;
  2. import android.content.Intent;
  3. import android.os.Bundle;
  4. import android.os.Handler;
  5. import androidx.appcompat.app.ActionBar;
  6. import androidx.appcompat.app.AppCompatActivity;
  7. import com.chinaappsremover.R;
  8. public class Splash extends AppCompatActivity {
  9. protected void onCreate(Bundle bundle) {
  10. super.onCreate(bundle);
  11. setContentView(R.layout.activity_splash);
  12. ActionBar supportActionBar = getSupportActionBar();
  13. if (supportActionBar != null) {
  14. supportActionBar.hide();
  15. }
  16. new Handler().postDelayed(new Runnable() {
  17. public void run() {
  18. Splash splash = Splash.this;
  19. splash.startActivity(new Intent(splash, MainActivity.class).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK));
  20. Splash.this.finish();
  21. }
  22. }, 2500);
  23. }
  24. }