1
길게 누르기로 스크롤하고 싶기 때문에 사용자는 화면을 놓고 스크롤 할 필요가 없습니다. 스크롤로 안드로이드 길게 누르기
내가 제스처 검출기 구현 한
...final GestureDetector gestureDetector = new GestureDetector(new GestureDetector.SimpleOnGestureListener() {
public void onLongPress(MotionEvent e) {
// action 1
}
public boolean onScroll(MotionEvent event1, MotionEvent event2, float velocityX, float velocityY) {
// action 2
}
}
public boolean onTouchEvent(MotionEvent event) {
return gestureDetector.onTouchEvent(event);
}
하지만 지금 행동 한 행동이, 사용자의 화면을 해제하지 않고 화면 ... 어떻게이 작업을 연결할 수를 공개해야?
당신의 onTouch (보기 V, MotionEvent 이벤트) 당신이 원하는 경우에 true를 반환해야합니다 : 나는 아래 두 이벤트 모두 고려 걸릴 것
ScrollView
에 묶여OnToucListener
와 클래스, 현재 설정을 모르는 ACTION_MOVE ... 이벤트를 처리하십시오. – ebtokyo