| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
Tags
- #android activity
- html code
- 하이퍼레저패브릭
- 토큰경제
- #CallByAddress
- html object
- html multimedia
- html plug-in
- #1차원배열
- html video
- html id
- #binary
- #2차원배열
- #C++ has~a
- #JAVASCRIPT
- relative path
- #다차원포인터
- #성적관리프로그램
- #bubbleSort
- hyperledger transaction
- git flow
- html youtube
- docker example
- html charset
- #C++ 연산자함수오버로딩
- #자바상속#자바이즈어#is~a
- html5 new tag
- #3차원배열
- border-box
- mac terminal command
Archives
- Today
- Total
A sentimental robot
익명클래스를 이용해서 이벤트리스너 만들기 본문
View.OnClickListener on=new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(MainActivity.this, "hihi", Toast.LENGTH_SHORT).show();
}
};
Button button01=findViewById(R.id.button01);
button01.setOnClickListener(on);
Button button01=findViewById(R.id.button01);
button01.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(MainActivity.this, "hihA", Toast.LENGTH_SHORT).show();
}
});
((Button) findViewById(R.id.button01)).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
}
});
'Android Studio' 카테고리의 다른 글
| ListView (0) | 2018.01.29 |
|---|---|
| Spinner (0) | 2018.01.29 |
| LinearLayout (0) | 2018.01.12 |
| 메소드를 공유하는 위젯 (0) | 2018.01.12 |
| 안드로이드를 시작하기 전에.. (0) | 2018.01.11 |