Skip to content
모두의 공간
개발자 공간
사용자 공간
최근글
로그인
접속유지
회원가입
ID/PW 찾기
모두의 공간
새로운 소식
새로운 게임/앱
개발자 공간
개발자 게시판
개발자 질문/답변
개발자 정보
구인/구직/의뢰
행사/세미나/교육
(구)질문/답변
사용자 공간
앱 정보/후기
게임 정보/후기
기기 정보/후기
잡담/유머/창작
개발자 질문/답변 게시판이 새로운 공간으로 이전되었습니다.
안드로이드 개발 질문/답변 (글 수
45,052
)
전체보기
앱개발 질문
플랫폼 질문
JAVA 질문
기타 질문
자주하는 질문
gallery에서 좌우 이동할 때 이벤트 받기
wooya510
https://www.androidpub.com/android_dev_qna/49937
2009.12.10
14:50:47
3909
1
앱개발 질문
Gallery에서 좌우 이동할 때 좌 또는 우측으로 이동한다는 이벤트를 받을 수 있나요?
이 게시물을
목록
2009.12.10
15:58:34
세모군
public boolean
onScroll
(
MotionEvent
e1,
MotionEvent
e2, float distanceX, float distanceY)
을 이용해보시면 어떨까 싶은데요.
SDK상에서 제공하는 Gallery의 받을수 있는 이벤트는 아래와 같습니다. :)
boolean
onDown
(
MotionEvent
e)
Notified when a tap occurs with the down
MotionEvent
that triggered it.
boolean
onFling
(
MotionEvent
e1,
MotionEvent
e2, float velocityX, float velocityY)
Notified of a fling event when it occurs with the initial on down
MotionEvent
and the matching up
MotionEvent
.
boolean
onKeyDown
(int keyCode,
KeyEvent
event)
Handles left, right, and clicking
boolean
onKeyUp
(int keyCode,
KeyEvent
event)
Default implementation of
KeyEvent.Callback.onKeyMultiple()
: perform clicking of the view when
KEYCODE_DPAD_CENTER
or
KEYCODE_ENTER
is released.
void
onLongPress
(
MotionEvent
e)
Notified when a long press occurs with the initial on down
MotionEvent
that trigged it.
boolean
onScroll
(
MotionEvent
e1,
MotionEvent
e2, float distanceX, float distanceY)
Notified when a scroll occurs with the initial on down
MotionEvent
and the current move
MotionEvent
.
void
onShowPress
(
MotionEvent
e)
The user has performed a down
MotionEvent
and not performed a move or up yet.
boolean
onSingleTapUp
(
MotionEvent
e)
Notified when a tap occurs with the up
MotionEvent
that triggered it.
boolean
onTouchEvent
(
MotionEvent
event)
Implement this method to handle touch screen motion events.
Close Login Layer
XE Login
아이디
비밀번호
로그인 유지
OpenID Login
Open ID
회원가입
ID/PW 찾기
인증메일 재발송
OpenID
OpenID
Close Login Layer
public boolean onScroll (MotionEvent e1, MotionEvent e2, float distanceX, float distanceY)
MotionEvent
that triggered it.MotionEvent
and the matching upMotionEvent
.KeyEvent.Callback.onKeyMultiple()
: perform clicking of the view whenKEYCODE_DPAD_CENTER
orKEYCODE_ENTER
is released.MotionEvent
that trigged it.MotionEvent
and the current moveMotionEvent
.MotionEvent
and not performed a move or up yet.MotionEvent
that triggered it.