开发者

Problem with default Android onKey... sound

开发者 https://www.devze.com 2023-03-09 09:06 出处:网络
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.

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

精彩评论

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