开发者

Android: Sub-class Gallery doesn't scroll by onKeyDown event

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜