event6 Android - Event Timer # Android - Event Timer : android, Event, Timer ```java package exam.Input; import android.app.*; import android.os.*; import android.widget.*; import exam.AndroidExam.*; /* 핸들러 멤버 public class Timer extends Activity { int value=0; TextView mText; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.input_timer); mText=(TextView)findViewBy.. 2019. 9. 20. Android - Event Click # Android - Event Click ```java package exam.Input; import android.app.*; import android.os.*; import android.view.*; import android.widget.*; import exam.AndroidExam.*; /* 임시 객체로 핸들러 만들기 public class Fruit extends Activity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.input_fruit); Button btnApple=(Button)findViewById(R.id.apple).. 2019. 7. 17. Android - Event Keyboard # Android - Event Keyboard ```java package exam.Input; import android.app.*; import android.content.*; import android.graphics.*; import android.os.*; import android.view.*; public class MoveCircle extends Activity { private MyView vw; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); vw = new MyView(this); vw.setFocusable(true); vw.setFocusableInTouchMode(tru.. 2019. 7. 17. Android - Event # Android - Event ```java package exam.Input; import java.util.*; import android.app.*; import android.content.*; import android.graphics.*; import android.os.*; import android.view.*; public class FreeLine extends Activity { private MyView vw; ArrayList arVertex; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); vw = new MyView(this); setContentView(vw); arVe.. 2019. 7. 17. Android - Event Access # Android - Event Access ```java package exam.Input; import android.app.*; import android.os.*; import android.view.*; import android.widget.*; import exam.AndroidExam.*; /* 핸들러내의 지역 변수로 선언하기 public class HandlerAccess extends Activity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.input_handleraccess); LinearLayout linear = (Linea.. 2019. 7. 17. bind click event loop index Click Me! Click Me! Click Me! Click Me! Click Me! Click Me! var g = document.getElementById('my_div'); for (var i = 0, len = g.children.length; i < len; i++) { (function(index){ g.children[i].onclick = function(){ alert(index) ; } })(i); } https://jsfiddle.net/softm/en067grx/ 2019. 7. 12. 이전 1 다음