How to have scrolling animation programmatically

Samurai picture Samurai · Sep 26, 2010 · Viewed 14.5k times · Source

I'm trying to implement scroll animation for gallery programmatically.

Tried with setSelection(int pos, Boolean animate) and it's not working.

Is there anyway to override setSelection() method.

Answer

pleerock picture pleerock · Jan 23, 2012

Just now I have got this problem. I was need to move just one element of the gallery, so the best solution to me was to emulate key down event

myGallery.onKeyDown(KeyEvent.KEYCODE_DPAD_RIGHT, null);

or

myGallery.onKeyDown(KeyEvent.KEYCODE_DPAD_LEFT, null);