mActivity.setContentView(R.layout.main);
imgView = (ImageView)mActivity.findViewById(R.id.main_button_0);
imgView.setOnTouchListener(this);
터치 이벤트
public boolean onTouch(View v, MotionEvent event) {
// TODO Auto-generated method stub
if(v.getId() == R.id.main_button_0) {
if(event.getAction() == MotionEvent.ACTION_MOVE) {
Log.d("TEST", "ACTION_MOVE");
}.......
if()로 각 액션의 로그를 확인해 봤는데, 오로지 ACTION_DOWN만 반응합니다.
무엇이 문제 일까요?
참고로 하단에 xml 화일 내용도 첨부합니다.
<?xml version="1.0" encoding="utf-8"?>
<AbsoluteLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="10px"
>
<ImageView
android:src = "@drawable/photo00"
android:id = "@+id/main_button_0"
android:layout_width = "70px"
android:layout_height = "70px"
android:scaleType = "fitXY"
/>
</AbsoluteLayout>
imgView를 생성한 다음,
imgView.setClickable(true);
해 주니 되네요. ㅠㅠ
이리 간단한걸..ㅠㅠ