Android: Subclass gallery does not view onKeyDown event

I have a child widget Gallery, which I configured its onFling method, otherwise everything should be the same as the Gallery widget.

And I'm trying to animate scroll left or right using:

gallery.onKeyDown(KeyEvent.KEYCODE_DPAD_LEFT, new KeyEvent(0, 0)); 

But this does not work in the gallery of the subclass. Any idea why?

+4
source share
1 answer

If you have this problem, try to get rid of the gallery interval value - this solved it for me.

+3
source

Source: https://habr.com/ru/post/1337100/


All Articles