diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/java/com/ploedige/threadtest/MainActivity.java b/app/src/main/java/com/ploedige/threadtest/MainActivity.java index 31d21d6..49da193 100644 --- a/app/src/main/java/com/ploedige/threadtest/MainActivity.java +++ b/app/src/main/java/com/ploedige/threadtest/MainActivity.java @@ -10,5 +10,8 @@ public class MainActivity extends AppCompatActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); + + TestThread testThread = new TestThread(); + testThread.run(); } } \ No newline at end of file diff --git a/app/src/main/java/com/ploedige/threadtest/TestThread.java b/app/src/main/java/com/ploedige/threadtest/TestThread.java new file mode 100644 index 0000000..b4510aa --- /dev/null +++ b/app/src/main/java/com/ploedige/threadtest/TestThread.java @@ -0,0 +1,18 @@ +package com.ploedige.threadtest; + +import android.util.Log; + +public class TestThread extends Thread{ + public void run() { + while (true){ + for(int i =1; i<=20; i++){ + Log.v("TestThread", String.valueOf(i)); + try { + this.sleep(250); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + } + } +}