Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.test;
- import android.app.Activity;
- import android.os.Bundle;
- import android.view.View;
- import android.widget.Button;
- import android.view.View.OnClickListener;
- public class MainActivity extends Activity implements OnClickListener {
- @Override
- public void onCreate(Bundle saveInstanceState) {
- super.onCreate(saveInstanceState);
- Button button = new Button(this);
- button.setText("Do Time Consuming : ");
- setContentView(button);
- button.setOnClickListener(this);
- }
- @Override
- public void onClick(View v) {
- runTh();
- }
- public void runTh() {
- new Thread(new Runnable() {
- @Override
- public void run() {
- try {
- for (int i = 0; i < 10; i++) {
- System.out.println(i);
- Thread.sleep(1000);
- }
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- }).start();
- }
- }
- 2019-03-18 21:26:57.752 32757-32757/? I/zygote: Not late-enabling -Xcheck:jni (already on)
- 2019-03-18 21:26:58.269 32757-32757/? W/zygote: Unexpected CPU variant for X86 using defaults: x86
- 2019-03-18 21:27:00.238 32757-32757/com.example.test I/InstantRun: starting instant run server: is main process
- 2019-03-18 21:27:00.954 32757-310/com.example.test D/OpenGLRenderer: HWUI GL Pipeline
- 2019-03-18 21:27:01.335 32757-310/com.example.test I/zygote: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
- 2019-03-18 21:27:01.336 32757-310/com.example.test I/OpenGLRenderer: Initialized EGL, version 1.4
- 2019-03-18 21:27:01.337 32757-310/com.example.test D/OpenGLRenderer: Swap behavior 1
- 2019-03-18 21:27:01.340 32757-310/com.example.test W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
- 2019-03-18 21:27:01.340 32757-310/com.example.test D/OpenGLRenderer: Swap behavior 0
- 2019-03-18 21:27:01.366 32757-310/com.example.test D/EGL_emulation: eglCreateContext: 0xe0384e00: maj 3 min 0 rcv 3
- 2019-03-18 21:27:01.372 32757-310/com.example.test D/EGL_emulation: eglMakeCurrent: 0xe0384e00: ver 3 0 (tinfo 0xe03a8ca0)
- 2019-03-18 21:27:01.445 32757-310/com.example.test D/EGL_emulation: eglMakeCurrent: 0xe0384e00: ver 3 0 (tinfo 0xe03a8ca0)
- 2019-03-18 21:27:04.567 32757-316/com.example.test I/System.out: 0
- 2019-03-18 21:27:05.569 32757-316/com.example.test I/System.out: 1
- 2019-03-18 21:27:06.571 32757-316/com.example.test I/System.out: 2
- 2019-03-18 21:27:07.573 32757-316/com.example.test I/System.out: 3
- 2019-03-18 21:27:07.592 32757-317/com.example.test I/System.out: 0
- 2019-03-18 21:27:08.576 32757-316/com.example.test I/System.out: 4
- 2019-03-18 21:27:08.595 32757-317/com.example.test I/System.out: 1
- 2019-03-18 21:27:09.578 32757-316/com.example.test I/System.out: 5
- 2019-03-18 21:27:09.596 32757-317/com.example.test I/System.out: 2
- 2019-03-18 21:27:11.971 32757-316/com.example.test I/System.out: 6
- 2019-03-18 21:27:11.973 32757-317/com.example.test I/System.out: 3
- 2019-03-18 21:27:12.897 32757-318/com.example.test I/System.out: 0
- 2019-03-18 21:27:12.974 32757-316/com.example.test I/System.out: 7
- 2019-03-18 21:27:12.975 32757-317/com.example.test I/System.out: 4
- 2019-03-18 21:27:13.899 32757-318/com.example.test I/System.out: 1
- 2019-03-18 21:27:13.977 32757-316/com.example.test I/System.out: 8
- 2019-03-18 21:27:13.978 32757-317/com.example.test I/System.out: 5
- 2019-03-18 21:27:14.901 32757-318/com.example.test I/System.out: 2
- 2019-03-18 21:27:14.979 32757-316/com.example.test I/System.out: 9
- 2019-03-18 21:27:14.980 32757-317/com.example.test I/System.out: 6
- 2019-03-18 21:27:15.902 32757-318/com.example.test I/System.out: 3
- 2019-03-18 21:27:15.982 32757-317/com.example.test I/System.out: 7
- 2019-03-18 21:27:16.904 32757-318/com.example.test I/System.out: 4
- 2019-03-18 21:27:16.985 32757-317/com.example.test I/System.out: 8
- 2019-03-18 21:27:17.906 32757-318/com.example.test I/System.out: 5
- 2019-03-18 21:27:17.987 32757-317/com.example.test I/System.out: 9
- 2019-03-18 21:27:18.908 32757-318/com.example.test I/System.out: 6
- 2019-03-18 21:27:19.911 32757-318/com.example.test I/System.out: 7
- 2019-03-18 21:27:20.912 32757-318/com.example.test I/System.out: 8
- 2019-03-18 21:27:21.915 32757-318/com.example.test I/System.out: 9
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement