问题
I have a sub-classed Gallery widget which I customized its onFling method, otherwise everything should be the same as the original Gallery widget.
And I am trying to animate its scrolling left or right by using:
gallery.onKeyDown(KeyEvent.KEYCODE_DPAD_LEFT, new KeyEvent(0, 0));
But that doesn't seems to work on the sub-class Gallery. Any idea why?
回答1:
If you guys have this problem, try get rid of the gallery spacing value -- that solved it for me.
来源:https://stackoverflow.com/questions/4801700/android-sub-class-gallery-doesnt-scroll-by-onkeydown-event