I have a sub-classed Gall开发者_如何学Cery 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?
If you guys have this problem, try get rid of the gallery spacing value -- that solved it for me.
精彩评论