JET Blog
-
안드로이드의 Timer 기능안드로이드/개발코드 2014. 1. 29. 17:40
예제 1>class Test extends Activity {class MyTask extends TimerTask {public void run() {Log.d("myTask", "run()");}} protected void onCreate(Bundle savedInstanceState) {Timertimer = new Timer();MyTaskmyTask = new MyTask();//timer.schedule(myTask, 500);timer.schedule(myTask, 500, 3000); super.onCreate(savedInstanceState);}} 타이머 사용에 실패했던 이유는 timerTask를 어떻게 만들까? 였는데,,클래스를 만들면 되는 거였다. 예제 2>TimerTask myT..
-
Use the Custom Component안드로이드/개발 팁 2014. 1. 29. 14:05
Use the Custom Component We now have our custom component, but how can we use it? In the NotePad example, the custom component is used directly from the declarative layout, so take a look atnote_editor.xml in the res/layout folder.The custom component is created as a generic view in the XML, and the class is specified using the full package. Note also that the inner class we defined is reference..
-