开发者

Problem with default Android onKey... sound

I'm having hard time figuring out how to get rid of the default sound played while any key is pressed. I'm using following method but it still plays the same "beep" sound.

 @Override public boolean onKeyDown( int keyCode, KeyEvent event )
{
switch ( keyCode )
{
    case 25:
    ChangeImageUP( );
    break;

    case 24:
    ChangeImageDOWN( );
    break;

    default:
    return super.onKeyDown( keyCode, event );
}

return true;
}

Please help.

// Update I have figure out that if I overwrite onKeyUp in my main activity the beep is gone. But when i 开发者_高级运维start a second activity the beep returns, even after using that onKeyUp method.


That is controlled by the operating system and the users settings. You might not be able to modify it..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜