屏蔽物理按键后只有返回键屏蔽成功,安卓5.0的代码如下


@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
// TODO Auto-generated method stub
switch(keyCode){
case KeyEvent.KEYCODE_BACK:
case KeyEvent.KEYCODE_HOME:
case KeyEvent.KEYCODE_MENU:
case KeyEvent.KEYCODE_VOLUME_DOWN:
case KeyEvent.KEYCODE_VOLUME_UP:
case KeyEvent.KEYCODE_VOLUME_MUTE:
return true;
default:
return false

Android_Activity
浏览 1594回答 1
1回答

Android_Activity

没人吗
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Android