当前位置: 动力学知识库 > 问答 > 编程问答 >

android - Volume keys events while a menu is showing

问题描述:

I have overridden onKeyDown/onkeyUp for one of my activities in order to capture the Volume keys press events and manipulate the sound of the application. However I've noticed that while a menu (be it options menu or context menu ) is activated then I can't no longer capture the volume keys press events. How could this be by passed ?

PS I guess in larger sense this could refer to all keys not only the volume ones

网友答案:

I think you miss

return super.onOptionsItemSelected(item);
分享给朋友:
您可能感兴趣的文章:
随机阅读: