开发者

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

开发者 https://www.devze.com 2023-02-06 14:37 出处:网络
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.

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

精彩评论

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