android 关于gallery 的平滑代码滚动

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);

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

http://stackoverflow.com/questions/5006228/smoothly-scroll-to-specified-position-in-android-gallery

posted @ 2011-11-08 11:05  meieiem  阅读(1704)  评论(0编辑  收藏  举报