드로잉 기능이 포함된 커스텀 뷰를 따로 생성하여 Adapter를 이용하여 ListView로 계속 페이지를 늘리는 기능을 구현하려고 합니다.
그런데 페이지가 늘어나기 때문에 스크롤 기능이 들어가는데 스크롤과 드로잉 기능을 나누려고하는데 뜻대로 안되네요
드로잉은 안되고 스크롤만 되게 하는 기능은 잘 해결되었지만 스크롤은 막고 드로잉만 되게하는 부분에서 막히네요.
원래 페이지를 늘리기 전에는 드로잉이 잘 되었던 소스입니다. 하지만 페이지를 늘리면서 세로로 드로잉을 하면 자꾸
MotionEvent.ACTION_CANCEL 이 실행되네요 원인과 해결 방법을 알았으면 합니다.
@Override
public boolean onTouchEvent(MotionEvent event) {
float x = event.getX();
float y = event.getY();
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
Log.d("SCROLL","ACTION_DOWN!!!!!");
touch_start(x,y);
mPathException = true;
break;
case MotionEvent.ACTION_MOVE:
Log.d("SCROLL","ACTION_MOVE!!!!!");
touch_move(x,y);
break;
case MotionEvent.ACTION_UP:
Log.d("SCROLL","ACTION_UP!!!!!");
if(btouch_move_Draw){
Log.d("SCROLL","ACTION_UP!!!!!" + btouch_move_Draw);
touch_up(x,y);
mPathException = false;
}
break;
case MotionEvent.ACTION_CANCEL:
Log.d("SCROLL","ACTION_CANCEL!!!!!");
}
return true;
}