Taking over the volume key on Android

后端 未结 3 1742
眼角桃花
眼角桃花 2020-12-09 13:56

I want to take overinput over the Volume Up and Down. At the moment my code is:

@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {

    Log.v(         


        
3条回答
  •  囚心锁ツ
    2020-12-09 14:21

    If you handled the event, return true. If you want to allow the event to be handled by the next receiver, return false.

提交回复
热议问题