Recent Posts
Recent Comments
반응형
«   2025/05   »
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 29 30 31
Archives
Today
Total
관리 메뉴

오늘도 공부

android gallery left,reight move tip 본문

Android/Tip&Tech

android gallery left,reight move tip

행복한 수지아빠 2011. 5. 17. 14:42
반응형

public OnClickListener arrow_listener = new OnClickListener(){


@Override

public void onClick(View v) {

// TODO Auto-generated method stub

MotionEvent e1 = MotionEvent.obtain(

    SystemClock.uptimeMillis(), 

    SystemClock.uptimeMillis(),  

    MotionEvent.ACTION_DOWN, 89.333336f, 265.33334f, 0);

MotionEvent e2 = MotionEvent.obtain(

    SystemClock.uptimeMillis(), 

    SystemClock.uptimeMillis(), 

    MotionEvent.ACTION_UP, 300.0f, 238.00003f, 0);


switch(v.getId()){

case R.id.btn_map_arrow_left:


center_gallery.onFling(e1, e2, -800, 0);

break;

case R.id.btn_map_arrow_right:

center_gallery.onFling(e1, e2, 800, 0);

break;

}

}

};

반응형

'Android > Tip&Tech' 카테고리의 다른 글

[펌]안드로이드 구글맵 거리계산, 좌표계산  (0) 2011.05.18
android google map api 참고문서  (0) 2011.05.17
무조건 한장씩 스크롤되는 gallery  (0) 2011.05.17
android tip  (0) 2011.05.16
canvas를 bitmap , png 저장  (0) 2011.05.16