android OnkeyListener with filter stop onItemClick

2020-04-13 05:49发布

问题:

This is my custom-dialog layout.

I want to move the selector of days and load respective items in the grid below it.

I could perform it via filter as said here

But because of the filter I am not being able to perform the action that should be triggered while clicking items in the grid view. It works fine when I click via mouse but not D-Pad. If I remove the filter in keyevent, it works normally, but problem again in sliding the selector via.

As I am working in STB, I have no option except remote as remote functionality is kept as the basic requirement.

回答1:

Finally solved it by using the filter in every case of key-event rather than at top.