Smart Device/Android15 Thread - AsyncTask 사용하기 - activity_main.xml - MainActivity.javapackage kr.co.devinside.mysimpleasynctask; import android.app.Activity; import android.os.AsyncTask; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.ProgressBar; import android.widget.TextView; import android.widget.Toast; public class MainActivity extends Activity { TextView textView01; ProgressBar pr.. 2015. 8. 10. Thread - Handler를 이용해 Runrable 객체를 실행하기 - activity_main.xml - MainActivity.java package kr.co.devinside.myrunablethread; import android.app.Activity; import android.os.Bundle; import android.os.Handler; import android.widget.ProgressBar; import android.widget.TextView; public class MainActivity extends Activity { boolean isRunning = false; TextView txtView = null; ProgressBar progressBar = null; Handler handler = null; ProgressRunnabl.. 2015. 7. 30. Thread - Handler를 이용해 Message Queue를 전달하는 방식 - activity_main.xml - MainActivity.java package kr.co.devinside.mythread;import android.app.Activity; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.widget.ProgressBar; import android.widget.TextView; public class MainActivity extends Activity { ProgressBar bar = null; TextView txtView = null; boolean isRunning = false; ProgressHandler progressHand.. 2015. 7. 30. Thread - Java의 Thread를 사용 - activity_main.xmlThread를 실행시킬 Start 버튼과 실행중인 쓰레드에서 값을 가져올 Get 버튼, 그리고 그 값을 보여줄 TextView - MainActivity자바의 표준 쓰레드를 사용해서 구현package kr.co.devinside.myjavathread; import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.TextView; public class MainActivity extends Activity { int value = 0; boolean b.. 2015. 7. 30. 이전 1 2 3 4 다음