如何捕获长preSS音量向下键的android? [英] how to capture long press volume down key in android?
本文介绍了如何捕获长preSS音量向下键的android?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
只是想知道是否有人能告诉我如何捕获的Android的音量向下键长键盘preSS。
just wondering whether anyone could tell me how to capture the long key-press of the volume down key in android.
推荐答案
可能低于code可以帮助你
may be below code will help you
@Override
public boolean onKeyLongPress(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN)
{
// to your stuff here
return true;
}
return super.onKeyLongPress(keyCode, event);
}
这篇关于如何捕获长preSS音量向下键的android?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文