WellcomeScreenActivity.java 921 B

123456789101112131415161718192021222324252627282930313233343536
  1. package epson.print;
  2. import android.content.Context;
  3. import android.content.Intent;
  4. import android.os.Bundle;
  5. import androidx.appcompat.app.AppCompatActivity;
  6. /**
  7. * 欢迎界面
  8. */
  9. public class WellcomeScreenActivity extends AppCompatActivity {
  10. Context mContext;
  11. @Override
  12. protected void onCreate(Bundle savedInstanceState) {
  13. super.onCreate(savedInstanceState);
  14. setContentView(R.layout.activity_welcome);
  15. mContext = this;
  16. new Thread() {
  17. int wait = 0;
  18. public void run() {
  19. try {
  20. sleep(1000);
  21. } catch (InterruptedException e) {
  22. e.printStackTrace();
  23. }
  24. Intent intent;
  25. intent = new Intent(mContext, IprintHome.class);
  26. mContext.startActivity(intent);
  27. finish();
  28. }
  29. }.start();
  30. }
  31. }